Middlebrough 2 Sporting Lisbon 3
Joseph-Desire Job and Chris Riggott kept Middlesbrough's Uefa Cup dream alive with two late goals after Steve McClaren's side had appeared dead and buried.
The English side were destroyed by a three-goal salvo inside the opening 20 minutes of the second half, and for all intents and purposes it appeared as if next week's return leg at the Jose Alvalade Stadium - the venue for the final in May - would be a virtual non-event.
Middlesbrough had no answer to Sporting's dynamic cut and thrust as the Portuguese giants made it clear they were a class above any opposition the Premiership side have faced this season in Europe.
But McClaren's players showed their mettle and spirit by clawing their way into the tie, although they will have to win by two clear goals if they are to reach the quarter-finals.
For 79 minutes Sporting showed scant regard for the fact Middlesbrough won all four of their previous home games in this competition, and their victory ensures they join only Chelsea and Manchester United this season in winning at the Riverside.
McClaren had warned his side they would have to be patient if they were to break down their Portuguese visitors as they delighted in playing keep-ball, and so it proved.
The game then changed in the first half on a dramatic piece of play-acting from Fabio Rochemback that not only angered referee Stefano Farina, but also fired up the home side.
Franck Quedrue did nothing more than bump into the Brazilian who feigned a back injury to buy time.
Despite Farina's gesticulations to play on, he eventually had to call a halt to allow the physios to attend to the midfielder who was ridiculously taken off on a stretcher, returning two minutes later to a chorus of boos.
Middlesbrough then proceeded to dominate the half, but despite using the wings to good effect and with 19-year-old Danny Graham on his first start a hustling, bustling presence, they only had a Boudewijn Zenden long-range drive to show for their efforts.
After the break it was a different story, with Sporting taking a 49th minute lead after Pedro Barbosa had won a crucial tackle on the halfway line with Zenden.
After playing in Roudolphe Douala who in turn fed Liedson, the skipper continued his run and just beat the offside trap, taking Liedson's pass in his stride and beating Mark Schwarzer with a curler just inside the Australia international's left-hand post.
Five minutes later Sporting doubled their lead, initially after Schwarzer had made a superb save in denying Douala, only for Zenden to again lose a crucial ball inside his own half.
With the home defence stretched, it culminated in another delightful pass, this time Douala delivering a far-post curler for Liedson to nod home his eighth goal of the competition.
It was then 3-0 in the 65th minute, this time Schwarzer saving a swerving drive from Hugo Viana, only for the ball to spin off his body and into the path of Liedson.
Schwarzer again saved bravely at his near post, but another ricochet dropped to the far post where Douala tapped home from a yard after taking a controlling touch to guarantee himself a simple finish.
It appeared all over, but Job then scored the goal of the game in the 79th minute with a spectacular scissor-kick in meeting a Zenden free-kick before Riggott drove home from 15 yards to at least give Middlesbrough something to fight for next Thursday.
MIDDLESBROUGH:Schwarzer, Reiziger (Nemeth 45), Riggott, Southgate, Queudrue, Parnaby, Doriva, Zenden, Downing, Hasselbaink, Graham (Job 53). Subs Not Used: Jones, Cooper, McMahon, Wheater, Johnson. Booked: Parnaby. Goals: Job 79, Riggott 86.
SPORTING:Ricardo, Rogerio, Enakahire, Hugo, Rui Jorge, Pedro Barbosa (Sa Pinto 77), Rochemback, Joao Moutinho, Viana, Liedson (Tello 77), Douala (Beto 90). Subs Not Used: Nelson, Carlos Martins, Niculae, Miguel Garcia. Goals: Pedro Barbosa 49, Liedson 53, Douala 65.
Referee:S Farina (Italy).