Riyad Mahrez, the goal hero in last year’s semi-final against Paris Saint-Germain, looked to have delivered again when he struck to give City a 73rd minute lead to put us 5-3 ahead on the tie.
But in a dramatic and gut-wrenching finale, Real substitute Rodrygo struck twice inside injury time to stun City and so send the tie into extra time.
And a 94th minute penalty from Karim Benzema sealed the most improbable of comebacks from the Spanish champions to break City’s hearts.
There had been no hint of the late drama to come when City made the opening breakthrough.
Having impressed in a fine first half display where we dominated possession and territory, City then also dug deep to repel Real’s best attacking efforts straight after the restart.
Kyle Walker, back in the starting line up after three weeks on the sidelines, personified City’s mindset with a superb display before he was forced off with a recurrence of an ankle complaint midway through the second half.
And with 17 minutes left it looked for all the world as if Mahrez – the three-goal hero of last season’s semi-final win over PSG - had worked his magic again.
Latching onto Bernardo Silva’s inviting ball after fine work from substitutes Oleks Zinchenko and Ilkay Gundogan, Mahrez curled a brilliant effort into the far corner of the net to spark scenes of wild delight.
Fellow sub Jack Grealish then saw an effort cleared off the line and another graze the post as City looked to double our advantage.
But in a shattering finale, the 13-times European champions demonstrated their resilience as Carlo Ancelotti’s men staged a staggering fightback.
With six minutes of added time having been signalled on the board, Real sub Rodrygo levelled twice in 90 seconds to turn the game and tie on its head.
First, Benzema turned an angled ball to the far post back into the six-yard box and the forward gets across his man to turn it past Ederson.
And then he was picked out by a pinpoint ball from the right and powered a forceful header past Ederson to level the score on aggregate and send the tie into extra time.
Three minutes into the restart, Real struck again through dangerman Karim Benzema to move ahead on the tie for the first time.
But, try as we might, we couldn’t force a late piece of magic to find a response and it’s Real Madrid who will go through to face Liverpool in the final later this month.
REAL MADRID: Courtois, Carvajal, Militao (Vallejo 114), Casemiro, Mendy, Valverde, Nacho, Kroos (Rodrygo 68), Modric (Camavinga 74), Benzema ©, Vinicius Jnr (Lucas v 114)
Subs: Lunin, Fuidias, Alaba, Asensio, Marcelo, Jovic, Ceballos, Mariano,
CITY: Ederson, Walker (Zinchenko 72), Dias (c), Laporte, Cancelo, Rodrigo (Sterling 94), De Bruyne (Gundogan 72), Bernardo, Foden, Jesus (Grealish 79), Mahrez (Fernandinho 84)
Subs: Steffen, Carson, Ake, Fernandinho, Egan Riley, Palmer, McAtee, Lavia
"It is tough for us. We cannot deny it. We were so close to arriving in the Champions League final.
"We didn’t play much good in the first half. We didn’t find our game, but it’s normal in this competition. The second half was much better. After the goal we controlled it.
"We found the game, we arrived at the byline. Jack helped us to control the game and unfortunately he could not finish when we were close.
"We need time now. One or two days, but we will rise. We will come up. We have to do it, with our people."
ACTION MAN Bernardo
No-one on the City side deserved to end up on the losing side at the Bernabeu… not least Bernardo Silva.
City’s very own Duracell man just keeps going and going and it was only fitting that it was his assist that set up Mahrez for his goal.
However, all his efforts proved in vain after that bewildering Real fightback.
The big games keep on coming as City return to Premier League action when we play host to Newcastle United on Sunday 8 May.
With four games of the domestic season left, Guardiola’s side are one point clear of Liverpool and will be seeking another crucial three-point return.
However, it promises to be a stern examination against Eddie Howe’s side who have impressed greatly since the former Bournemouth boss took charge earlier this season.
Kick-off is at 16.30 (UK).
News about Real Madrid v Man City
Real Madrid 3-1 City: Match stats and reaction
Real Madrid 3-1 City: Highlights
Enjoy the best of the action from City's Champions League semi-final second leg tie away at Real Madrid. Watch more
Real Madrid v City: Full-match replay
Watch the entire 90 minutes of Manchester City's Champions League semi-final second leg tie with Real Madrid on CITY+. Watch more
Champions League exit is tough for us, admits Guardiola
Pep Guardiola summed up a heart-breaking Champions League semi-final loss to Real Madrid by admitting that the manner of City's 6-5 aggregate defeat was ‘tough’ to take. Read more
Real Madrid 3-1 City: Extended highlights
City's hopes of a reaching a second successive Champions League final were dashed on a night of heartbreak in Madrid. Watch more