El Hadji Diouf’s first goal for the club had put the Light Blues ahead, before Pedro Mendes’ equaliser before half time and a late Yannick Djalo goal looked like they would take the home side through.
But when Richard Foster made space on the right deep in injury time it exposed the home side’s defence and gave Edu the easiest of chances.
The 2-2 draw on the night was enough to see them through despite having not won an away game in continental competition since their 2008 victory over the same side.
It was the most dramatic of finishes and left the home support stunned and the travelling fans in fine voice.
It had looked like it would be more straightforward in the early stages for Walter Smith’s side but in the end it took a famous late winner to take them through.
Smith was forced in to two changes from the side that lost to Celtic at the weekend with Nikica Jelavic ineligible and Steven Naismith injured.
That meant introductions to the team for Richard Foster and John Fleck, with Fleck making only his third start of the campaign.
The changes in personnel also allowed the Light Blues gaffer to reshuffle his formation with Foster forming part of a defensive five at the back.
Fleck slotted in on the left flank, with Mo Edu and Steven Whittaker occupying the middle of the park, and Steven Davis on the right wing.
And it was from Davis’ wide area that Rangers made the breakthrough after a relatively scrappy start to proceedings.
The Northern Ireland international floated a delightful cross from the right that hung perfectly for Diouf who was left curiously unmarked.
His header was equally well controlled and it bounced past Rui Patricio to give Rangers the lead and remove the barrier of Sporting’s away goal, scored at Ibrox a week earlier.
It was Diouf’s second effort, with the Senegalese forward firing an effort well wide in the opening minutes as he adapted to the lone striking role.
The goal seemed to settle the visitors initially but there remained a few nervy moments at the back with Djalo in particular looking threatening on the left for Sporting.
In the main Smith’s side managed to restrict the home side to long range efforts, but as Gers fans know all too well Mendes has the ability to hurt sides from distance.
And when Davie Weir missed a header in the box Kyle Bartley, just behind him, was not expecting the ball.
It ricocheted off the on loan Arsenal defender’s chest to a Sporting player, who rolled the ball in to Mendes’ path.
The former Ger produced the smoothest of finishes to curl the ball low past Allan McGregor and in to the corner of the net from around 20 yards.
The half time break started with a scuffle between Diouf and his marker that was quickly split by the fourth official.
But the energy of that incident was carried in to the second period and it was the Portuguese side that started the half better.
Clearly eager to gain the advantage in the tie they built some sustained pressure on the Gers defence and it took a fingertip stop from McGregor to deny first leg scorer Matias Fernandez from adding to his tally five minutes in to the half.
Almost instantly the Light Blues responded with an excellent counter attack that started with Whittaker, who managed to find Foster only for the right back to be closed out before he could find Fleck.
That seemed to lift the visitors who enjoyed a stronger spell, with Diouf only just offside after a good exchange between Bougherra and Davis allowed the Algerian to pick out his fellow African.
And Davis, a constant thorn in the home team’s side, then found Fleck in acres of space on the left only for the teenager to fail to find either Whittaker or Diouf with his cross.
With both sides knowing that extra time would be needed if the scores stayed the same the match was becoming increasingly stretched.
And it was Sporting to threaten again, with Djalo nipping clear of a Bougherra tackle and working the ball to Joao Pereira in the box, who forced another fine save from McGregor.
The openings Sporting were carving didn’t dissuade Smith from making some attacking changes in a bid to win the game.
He introduced Vladimir Weiss and Kyle Lafferty for Fleck and Weir respectively with 20 minutes of normal time remaining.
His final throw of the dice came with eight minutes remaining, with David Healy introduced for Diouf, but within moments Rangers were behind.
Pereira found space on the Rangers left and his delivery took Foster out of the game at the back post, leaving Djalo to head beyond a helpless McGregor.
It seemed there was little time for the visitors to do anything about the scoreline, but substitutes Weiss and Lafferty almost combined to get the goal.
Weiss broke on the left and played a teasing cross with the outside of his right foot, but Lafferty was just inches from finishing it off.
However within minutes the ball for Edu was inch perfect and the American made no mistake from close range.