Massimo Maccarone finally repaid Middlesbrough's faith as his 90th minute strike sent Steve McClaren's side through to the semi-finals of the UEFA Cup on a night of high drama at the Riverside.
The Italian striker, who hasn't enjoyed the best of times on Teesside after an £8million move four years ago, struck Boro's fourth goal of the night in the last minute of the game to send Basel crashing out of the competition 4-3 on aggregate.
Heading into the second leg, Boro's task was already difficult enough as they trailed 2-0 on aggregate after a below-par display in Switzerland.
And a lapse of concentration halfway through the first period looked to have put paid to the home side's chances of reaching the last four as Basel suddenly took what looked like an unassailable lead.
Mladen Petric pumped a deep free-kick into the box and when Boris Smiljanic nodded it back across the face of goal Eduardo had the simple task of prodding it home in the 23rd minute.
That left the home side needing to score at least four times to progress, but to Boro's credit they refused to give up the fight.
First man-of-the-match Mark Viduka pounced in the 33rd minute to draw the home side level on the night as he picked up a pass from Yakubu and poked the ball past Pascal Zuberbuhler from just inside the area.
At half-time McClaren sent on Jimmy Floyd Hasselbaink as Boro went for broke with a front three and the move paid off as Viduka struck again after 57 minutes.
Yakubu played a superbly-weighted through ball to the Australian international who drifted around the keeper and rolled a left-foot shot into the far corner of the net.
With the Riverside faithful sensing a fight back was on the cards, Basel began to crumble and defensive rock Daniel Majstorovic was sent off 15 minutes from time after picking up his second yellow card for a needless push on George Boateng.
And how Boro capitalised on Basel's misfortune as Hasselbaink lit up the Riverside with a dipping shot from the edge of the box that left the keeper totally flat-footed on 79 minutes.
Then with time running out substitute Maccarone popped up to secure what until then had looked a most unlikely victory as he squeezed a shot between the keeper and the post after Zuberbuhler had palmed away Fabio Rochemback's strike.
Boro will now face a semi-final meeting with Steaua Bucharest after they beat cross-city rivals Rapid on the away goals rule.