Benfica, helped by an excellent Champions League debut from goalkeeper Ederson, clung on desperately then scored two late goals to beat Zenit St Petersburg 2-1 and reach the quarter-finals on Wednesday.
Hulk gave Zenit a 69th-minute lead with a controversial goal and the Russian champions were threatening a second against Benfica's makeshift defence when Nicolas Gaitan snatched an equaliser out of the blue with five minutes to go.
With the Russians pushing forward desperately, substitute Anderson Talisca scored with the last kick of the game to complete a 3-1 aggregate win for Benfica that sent them into the last eight for the first time since 2012.
Benfica, who had won only once in seven previous visits to Russia, were missing three central defenders through injuries and suspension.
Brazil goalkeeper Julio Cesar was also sidelined, forcing his 22-year-old compatriot Ederson to be thrown in at the deep end.
"I'm quiet, delighted, working daily, taking advantage of the opportunities," Ederson told reporters.
The first hour was a cagey affair with few chances, although Benfica nearly snatched an away goal in the fourth minute when Jonas's curling free kick was tipped over the bar by Yuri Lodygin.
Ederson showed some early uncertainty when Aleksandr Anyukov sent a low ball into area and Andreas Samaris had to rush in to clear the danger, but the keeper reacted quickly to dive at Artem Dzyuba's feet shortly afterwards.
Benfica, with 18-year-old Renato Sanches providing another performance which belied his age in midfield, tried to frustrate the visitors and it worked for the first hour.
Zenit came to life, however, after a double substitution by coach Andre Villas-Boas and immediately began creating chances.
Ederson did well to hold a close-range effort by Igor Smolnikov but was powerless to stop Zenit's goal which left Benfica fuming.
Yuri Zhirkov appeared to foul Nelson Semedo as the two went for the ball but play was waved on, the Russian broke down the left and crossed into the middle where Hulk headed in.
In doing so, the muscular Brazilian redeemed himself for a dismal performance which included firing two long-range free kicks straight into the wall.
Ederson then prevented what could have been a decisive second goal when he blocked at close range from Dzyuba, who managed to wriggle his way between four defenders in the penalty area.
Although Lodygin had brilliantly turned away Victor Lindelof's header in between, Benfica were on the ropes and the crowd were at fever pitch as Zenit pushed for a second.
Instead, the visitors grabbed an equaliser when Raul Jimenez won possession, crashed a 25-metre shot against the bar and Gaitan headed in from the rebound.
Zenit were still shell-shocked when Talisca fired a half-volley past Lodygin to wrap up the win with the last kick.