Shanghai SIPG advanced to the semifinals of the AFC Champions League on Tuesday evening as Andre Villas-Boas' side defeated Guangzhou Evergrande 5-4 on penalties after the two-legged tie end in a 5-5 draw.
Yu Hai scored the winning penalty after Ricardo Goulart had missed Evergrande's opening spot kick at Tianhe Stadium.
It capped off an astonishing game in which the Brazilian scored a hat trick, only to end on the losing side.
Leading 4-0 from the first leg, SIPG surrendered their entire advantage during regulation time of the second leg before Wang Jiajie's sending off in the 97th minute looked likely to condemn Shanghai to defeat.
A first-half brace from Alan and two goals in the final seven minutes from Goulart improbably took the game in extra time. But Hulk's thunderous strike looked set to take SIPG through until Goulart completed his hat trick from the penalty spot in the 118th minute.
But the Brazilian was to miss from the spot just moments later. All five of SIPG's takers were successful as Shanghai qualified for the last four.
Villas-Boas' team will play either Kawasaki Frontale or Urawa Red Diamonds -- both of Japan -- as they make their debut appearance in the semifinals of the continental club championship at the expense of the two-time winners.
After such a poor showing in the first leg, Evergrande had no option but to push for an early goal and both Gao Lin and Goulart tried their luck in the opening 10 minutes.
Just before the midway point in the half, however, Luiz Felipe Scolari's team exploited the first crack in the SIPG defence. Alan capitalised on a poor defensive header from Shi Ke before rounding goalkeeper Yan Junling and rolling the ball calmly into the unguarded net.
The goal still left Evergrande with a monumental task. But it gave the two-time champions hope that SIPG's defence -- never the most secure of units -- could be breached again.
So it proved with 10 minutes remaining of the half as Alan claimed his second. The Brazilian reacted quickest to Zhang Linpeng's curling centre from the right as he directed his header into the roof the net.
SIPG were teetering and should have been punished further two minutes before the break, only for Goulart to knock his attempt narrowly wide with the defence exposed once more.
Alan, meanwhile, was denied a first-half hat trick in injury time as Lin Chuangyi desperately slid in to hook the ball clear after the Brazilian once again found space to push his effort beyond the goalkeeper.
SIPG's brittleness in defence forced Villas-Boas to introduce Wei Zhen for Zhang Wei while Yu Hai replaced Lu Wenjun to add some attacking thrust against a Guangzhou side guaranteed to continue to push forward.
The changes stemmed the relentless flow of Evergrande chances, although the home side continued to threaten.
Goulart's measured ball from the left was deflected narrowly beyond the reach of Gao Lin while the Brazilian rattled the crossbar with a fearsome shot from a tight angle that defeated Yan for pace, only to shudder the woodwork.
Goulart continued to torment the SIPG defence without reward. Yan was equal to the task 13 minutes from time when he dropped low to push the striker's downward header of Alan's in-swinging free kick around the post.
The Brazilian finally put his name on the scoresheet seven minutes from time when he dived low to steer Alan's low cross home with his head from close range.
A minute into injury time, he directed another header beyond Yan to, remarkably, level the aggregate score.
Wang was given his marching orders seven minutes into the first period of extra time when he fouled Alan to pick up his second booking, but Hulk's stunning free kick from 35 yards put SIPG in front on aggregate.
That advantage was not to last long, however, with Muriqui brought down in the area by Wen Shenchao. He was sent off for his second booking of the game to leave SIPG with nine men, and Goulart nonchalantly completed his hat trick to ensure the tie went to penalties.
But Goulart was unable to show the same composure in the first round of penalties and SIPG advanced as Yu Hai held his nerve.