Massimo Maccarone struck a 90th-minute winner as Middlesbrough produced an astonishing comeback to reach the Uefa Cup semi-finals.
A brace from Mark Viduka gave Middlesbrough hope
Eduardo's 23rd-minute tap-in for Basle left Boro needing four goals to win.
But Mark Viduka pulled one back before half-time with a powerful run and shot and angled in a second before Daniel Majstorovic was sent off for Basle.
Jimmy Floyd Hasselbaink's stunning shot made it 3-3, leaving fellow substitute Maccarone to slide home the winner.
The unlikely comeback, which booked Middlesbrough a semi-final meeting with Steaua Bucharest, was reward for some brave changes by Steve McClaren.
The Boro boss threw caution to the wind at half-time by introducing Hasselbaink to play alongside Viduka and Yakubu, and then later brought on Maccarone as Basle stumbled.
Indeed, his side might have considered themselves unlucky to have gone behind after a storming start to the game.
Inside a minute, Yakubu's challenge forced Basle keeper Pascal Zuberuehler to fumble the ball, but the striker hooked his shot narrowly wide.
That incident infused new belief into the home fans and on 14 minutes, they were appealing for a penalty.
Yakubu burst into the box and was clumsily brought down by Mile Sterjovski, with replays showing it deserved far more than the half-hearted appeal the Boro players mustered.
But a momentary lapse at the back cost the hosts dear.
Stuart Parnaby was not quick enough to prevent Boris Smiljanic heading across goal where Eduardo easily beat Gareth Southgate to the ball and smashed home.
With Boro now needing four goals to win, the Riverside Stadium fell silent, but the hosts stuck to their task.
Viduka gave them the lifeline their first-half display deserved when he shrugged off Majstorovic's challenge before wrong-footing Zuberuehler.
That brought the crowd back to life and they were almost celebrating again on 42 minutes when Yakubu turned Majstorovic brilliantly but shot too close to Zuberuehler.
McClaren sent his team out in barnstorming mood after the interval.
Basle's defence succumbed on 57 minutes when Yakubu slid the ball through for Viduka to sidestep Zuberuehler and shoot home from a difficult angle.
Boro's hopes were lifted again when Majstorovic, who had been Basle's dominant force in defence, was sent off for raising his hands.
His departure rocked Basle and they were reeling again when Hasselbaink collected the ball 25 yards out and, with hardly any backlift, powered in an unstoppable shot.
And as the minutes ticked down, Fabio Rochemback's shot was only parried by Zuberuehler and Maccarone squeezed home the rebound to send the disbelieving Boro fans into ecstacy.
If Boro can now get past Steaua, they will face Sevilla or Schalke in the final on 10 May in Eindhoven.
Middlesbrough: Schwarzer, Parnaby, Riggott, Southgate, Queudrue (Maccarone 67), Morrison (Hasselbaink 45), Boateng, Rochemback (Taylor 90), Downing, Viduka, Yakubu.
Subs Not Used: Jones, Ehiogu, Doriva, Davies.
Booked: Riggott, Maccarone.
Goals: Viduka 33, 57, Hasselbaink 79, Maccarone 90.
Basle: Zuberbuhler, Zanni, Majstorovic, Smiljanic, Berner, Degen (Chipperfield 61), Delgado (Ergic 70), Ba, Petric, Sterjovski (Quennoz 85), Eduardo Da Silva.
Subs Not Used: Crayton, Rakitic, Kulaksizoglu.
Sent Off: Majstorovic (73).
Booked: Majstorovic, Degen, Zuberbuhler.
Goals: Eduardo Da Silva 23.