Alvaro Morata came off the bench for a last-gasp header, as Juventus stuttered to a 2-1 win over Ferencvaros to reach the Champions League last 16.
The Bianconeri had to consolidate second place against a side they had recently beaten 4-1 in Hungary, but Leonardo Bonucci, Giorgio Chiellini, Merih Demiral and Gigi Buffon were out injured, leaving only Matthijs de Ligt – who made his comeback at the weekend – and Danilo in central defence. Ferencvaros missed Endre Botka and Eldar Civic, but adopted a five-man defence.
Paulo Dybala not only had a rare start, but also wore the captain’s armband and had the first chance after 15 minutes, forcing a reaction save on Cristiano Ronaldo’s cross to the back post.
However, Ferencvaros took a shock lead moments later, as Danilo slipped, allowing Tokmac Nguen to get down the right and his cross found Myrto Uzuni in front of his marker to fire in.
Juve struggled to mount much of a fightback, other than a weak Danilo header on a corner and Ronaldo scoring when several metres offside.
He was just getting warmed up, as moments later unleashed a left-foot rocket from outside the area that bounced just in front of the goalkeeper and flew into the near bottom corner.
Abraham Frimpong charged down a Federico Bernardeschi attempt in the area, then Denes Dibusz rushed off his line to tackle Ronaldo one-on-one after an ill-advised back-pass.
Bernardeschi was unlucky not to score on the hour mark, as his control and strike was spectacularly fingertipped onto the upright by Dibusz.
Andrea Pirlo made three changes at once, introducing Federico Chiesa, Alvaro Morata and Dejan Kulusevski together.
Morata’s splendid through ball sent Ronaldo clear on goal, but again Dibusz stood his ground really well and managed to win the one-on-one battle.
The roles were reversed on 76 minutes when Morata ran on to the Chiesa pass, but he fired it onto the near upright, having narrowed the angle too much.
Rodrigo Bentancur’s chest and volley was fingertipped over the bar, but just as it seemed as if the Hungarians would snatch a point, that man Morata confirmed his extraordinary form this season.
Juan Cuadrado managed to get the cross in from the right despite an awkward bounce and Morata intelligently nodded it down into the ground from six yards, so it squirmed under the goalkeeper. It was the winner they needed deep into stoppages, as Juventus go through to the Round of 16.
Juventus 2-1 Ferencvaros
Uzuni 19 (F), Ronaldo 35 (J), Morata 92 (J)
Juventus: Szczesny; Cuadrado, Danilo, De Ligt, Alex Sandro; McKennie (Kulusevski 62), Bentancur (Rabiot 82), Arthur (Ramsey 82), Bernardeschi (Chiesa 62); Dybala (Morata 62), Ronaldo
Ferencvaros: Dibusz; Lovrencsics (Botka 75), Blazic, Frimpong, Dvali, Heister; Siger (Laidouni 75), Somalia; Zubkov (Isael 70), Uzuni, Nguen (Boli 70)
Ref: Siebert (GER)