Real Madrid progressed to the last four of the Champions League despite defeat on the night to a Galatasaray side whose second half comeback had Jose Mourinho's side in a panic.
Already three goals up from the first leg at the Bernabeu, the tie was seemingly put to bed by Cristiano Ronaldo's seventh-minute strike.
But an Emmanuel Eboue thunderbolt after 57 minutes brought Gala back level on the night, before Wesley Sneijder put the home side ahead after 70 minutes.
Seconds later Didier Drogba reduced the aggregate deficit further and although Real substitute Alvaro Arbeloa saw red late on, Ronaldo notched his second in injury time, as Madrid's quest for a 10th European Cup continued despite a 3-2 defeat on the night.
The visitors started quickly and just three minutes were on the clock when Fernando Muslera rashly came out to clear, his effort falling to Angel Di Maria, who shot wide.
Four minutes later they were on the scoresheet.
Sami Khedira was allowed to cross from the right and in came Ronaldo, who got to the ball before the home defender to shoot past a helpless Muslera from three yards out.
The tie looked finished as a contest and Ronaldo could have doubled his night's tally moments later when the home side backed off, but from 25 yards the Portuguese shot straight at Muslera.
Drogba went close to converting a Sneijder shot after 20 minutes in Gala's first meaningful attack, before Madrid almost went two-up.
A delicious back-heel pass from Ronaldo played in Di Maria, but his angled effort was well tipped over by the Gala stopper.
Mourinho was forced into his first change after 31 minutes when Michael Essien had to be replaced by Arbeloa due to a leg injury.
Sneijder forced Diego Lopez into his first save after 38 minutes in what was a lacklustre first-half display from the hosts.
Madrid missed another chance to go two up 11 minutes after the restart when Ronaldo somehow missed from eight yards out - scuffing his effort with the ball trapped under his feet.
Moments later and the home side were level thanks to a tremendous goal, albeit from an unlikely source.
Sneijder's hopeful cutback found a sprinting Eboue who from the edge of the box powered an unstoppable shot into the top corner.
And just three minutes later they should have gone ahead. Drogba's strength caused all sorts of problems for the Real defence with the ball falling to Sneijder.
However with just Lopez to beat and from 12 yards out he screwed his shot wide of the far post.
Eboue's goal had, however, galvanised the home side and with the Ataturk Stadium firmly behind their side Gala took a deserved lead.
Sneijder showed a turn of pace more associated with his best days at Inter, nutmegged Rafael Varane before side-footing into the corner.
And moments later it was 3-1 when Drogba got in front of his defender to flick a cross into the corner of the net.
Raul Albiol replaced Mesut Ozil as Mourinho looked to arrest his team's slide, but they had to play out the final moments with 10 men after Arbeloa saw red after receiving a second yellow card for dissent.
There was still time for a fifth goal on the night when Ronaldo scored in injury time.