Ten-man Porto upset Juventus to reach the Champions League quarter-finals on away goals after a 4-4 aggregate draw despite losing 3-2 to the Italian side on Tuesday.
Sergio Oliveira's extra-time free-kick for Porto's second goal proved decisive for the visitors.
Porto dominated the first half and took the lead in the 19th minute with Oliveira's penalty taking them into the break in front as they looked comfortable at the Juventus Stadium.
But with the first attack of the second half Juve's Federico Chiesa, who scored their goal in the 2-1 last-16, first-leg defeat in Portugal, arrowed a strike into the top corner to give his side hope four minutes after the re-start.
The game turned further in Juve's favour as Mehdi Taremi needlessly got sent off for picking up a second yellow card in the 54th minute for kicking the ball away, with Chiesa levelling the scoreline on aggregate with his head in the 63rd.
The hosts had chances to win the tie but the game went to extra time and the drama was far from over as Porto won a free-kick which Oliveira drilled home to spark wild scenes of celebration amongst the players and coaching staff.
Adrien Rabiot's header three minutes from time for Juve ensured a grandstand finish in an enthralling encounter, but Porto held on for a famous victory.