Porto progressed to the quarter-finals of the Champions League after Alex Telles' penalty secured a 3-1 victory over Roma three minutes from the end of extra-time.
After cancelling out Roma's 2-1 first-leg lead to take the tie beyond 90 minutes, Telles' late strike, after a Video Assistant Referee review, earned them a 4-3 aggregate victory, and increased the pressure on the Italians' manager Eusebio Di Francesco.
Reports had suggested he would be sacked if his team lost, and their elimination comes with them also three points off the top four in Serie A. After falling behind to Tiquinho Soares' first-half strike, a penalty from Daniele De Rossi brought Roma level and left them on course for the final eight.
The influential midfielder then suffered an injury towards the end of the first half, and Porto took advantage to force extra-time with Moussa Marega's finish, and then to ensure progress through Telles when penalties neared.
The hosts threatened as early as the third minute, when an early corner came to Jesus Corona on the edge of the area and he struck it well, but could not keep the ball down.
He again went close midway through the first half before, with them again in the ascendancy, in the 26th minute Soares gave them the lead.
With Roma's Kostas Manolas caught in possession, Marega sped down the left and rolled the ball across the area to Soares, who then routinely tapped in from two yards, with VAR confirming he had been narrowly onside.
It was shortly after Edin Dzeko had gone close that the visitors won the 37th-minute penalty from which De Rossi equalised.
Diego Perotti was brought down in the area by Eder Militao, and from the spot De Rossi dummied, stopped, and then sent Iker Casillas the wrong way. A suspected muscle injury then led to him being replaced by Lorenzo Pellegrini on the stroke of half-time.
Soares came close to restoring Porto's lead early in the second half when his diving header bounced off the grass and over, and Marega then forced a fine save from goalkeeper Robin Olsen.
The lively Marega was again influential in the 53rd minute, this time levelling the tie. When Olsen had punched a corner away, Rick Karsdorp cheaply conceded possession, allowing Corona to brilliantly curl the ball to the back post, where Marega needed only to touch it in.
In extra-time, Dzeko wasted a succession of chances to score the goal that would likely have taken Roma through.
But then came the drama in the 117th minute as Alessandro Florenzi pulled back Telles. There were suspicions of offside around the attacker but a VAR review ensured the penalty was awarded.
Telles took advantage to beat Olsen by firing into the bottom left corner, deepening Roma's misery and sending Porto through.