Sergio Oliveira’s 115th-minute goal shocked Juventus to send Porto through on away goals in a stunning Champions League last-16 tie.
Oliveira’s long-range free-kick deep into the second half of extra time went through the legs of Cristiano Ronaldo in the Juventus wall to make it 2-2 on the night and give Porto the lead over two legs.
Adrien Rabiot’s thumping header two minutes later gave the Italian champions hope, only for Porto goalkeeper Agustin Marchesin to produce a stunning save in the final moments to ensure the Portuguese champions advanced on away goals despite a 3-2 second leg Juventus win.
Porto had opened up a 3-1 aggregate lead through Oliveira’s 19th-minute penalty after Merih Demiral brought down Porto’s Mehdi Taremi.
But Juventus’ Federico Chiesa found the far corner from a tight angle in the 49th minute before Taremi was shown a second yellow card for kicking the ball away.
And Chiesa headed in a Juan Cuadrado cross after 63 minutes to level the tie on aggregate.
It looked like Juventus would capitalise on their man advantage but Porto defended superbly to take the match extra time where Oliveira’s decided the tie.
Juventus have now been knocked out on away goals at this stage for the second consecutive season.
Costinha’s last minute free-kick against Manchester United in 2004 ensured an unfancied Porto side advanced to the quarter-finals against Manchester United on an historic night for the Portuguese club, who went on to win the Champions League that season.
And 17 years later it was Oliveira who added his name into the history books with Juventus keeper Wojciech Szczesny unable to keep out his low strike.
Porto looked to have thrown away their chances of progressing when Iranian forward Taremi was shown two quick yellow cards for a late challenge and unsportsmanlike conduct early in the second half.
But once Juventus had levelled the tie on aggregate in the 63rd minute, a combination of stoic defending and fortune kept Andrea Pirlo’s side at bay.
Morata saw an injury-time goal ruled out while Cuadrado curled a thumping effort against the crossbar with seconds of normal time remaining.
In the extra 30 minutes, Juventus continued to create chances, but it was Sergio Conceicao’s side who scored against the run of play to advance to the final eight for the second time in three seasons.
Eyebrows were raised when former Juve midfielder Pirlo was named manager of the Italian giants last summer despite the World Cup winner having no previous managerial experience.
His side’s results this season have been, to put it lightly, inconsistent.
Juventus are in the final of the Coppa Italia, but in the league the side who have won the last nine Serie A titles look a shadow of their former selves.
With the gap to leaders Inter Milan at a worrying 10 points, Pirlo’s position at the top has repeatedly been brought into question.
An expected home win over Porto would have temporarily silenced critics. Instead, the voices against the former Juventus and Milan midfielder are expected to get louder.
Porto progressed in a Champions League knockout tie after winning the first leg for the first time since the 2003-04 quarter-final against Lyon, going on to win the competition that season.
Porto are winless in their last 14 away games in the Champions League knockout stages (D4 L10), conceding two or more goals on 10 occasions in this run.
There were just 104 seconds between Oliveira’s free-kick goal in 115th minute and Adrien Rabiot’s headed strike in the 117th minute.
Chiesa became the first Italian to score twice in a Champions League match for Juventus since Alessandro Del Piero against Real Madrid in November 2008, and the first to do so in a knockout match for Juve since Filippo Inzaghi against Manchester United in April 1999.
No Porto player has scored more penalties in the Champions League than Oliveira (three). Oliveira also netted Porto’s first direct free-kick in the competition since Casemiro vs Basel in March 2015.
Juventus’ Cuadrado became the first player to create 12 chances in a single Champions League game since Mesut Ozil for Real Madrid against Spurs in April 2011.