Sterling thought he had completed a stunning hat-trick in the dying the moments of a pulsating Champions League quarter-final but VAR intervened and Spurs went through to the semi-finals despite a 4-3 defeat on the night.
Sergio Aguero was adjudged to have strayed offside in the build-up, deflating City and meaning that Spurs would prevail with the score 4-4 on aggregate.
It was an incredible ending to a thrilling contest, which had seen both sides lead.
Sterling and Son Heung-min both struck twice in the first half, with Bernardo Silva’s deflected effort giving the hosts the lead.
An Aguero strike then put City in control of the tie but a bundled Fernando Llorente goal proved decisive for Spurs, who now face Ajax in the last four.
City manager Pep Guardiola said: “It is cruel but it is what it is and we have to accept it. After 20 minutes we were 3-2 up. In the second half we created a lot of chances and we scored the goals we needed. Unfortunately, it was a bad end for us so congratulations to Tottenham and good luck for the semi-finals.
“I support VAR but maybe from one angle Fernando Llorente’s goal is handball, maybe from the referee’s angle it is not.”
On Sterling’s goal that was ruled out: “I watched the action and the people from above decided it was offside. We missed a penalty in the first leg but I am so proud of the players and the fans.”
Liverpool eased into a semi-final against Barcelona as a late flurry of goals saw them triumph 4-1 in Porto and 6-1 on aggregate.
Sadio Mane, Mohamed Salah, Roberto Firmino and Virgil van Dijk netted for the Premier League leaders after they had held off the ambitions of Porto in the first half and then scored three times in the final half an hour. Porto got a consolation when Eder Militao netted.
It was not quite a repeat of the 5-0 rout Liverpool enjoyed here 14 months ago but by the final whistle the effect was just the same as Jurgen Klopp’s side advanced with the minimum of fuss.
Klopp said: “We played better this season. It was always going to be a whirlwind here and that was what it was. Second half the energy level dropped for Porto and we could control the game and score the goals. It is first time for me to play Barcelona, apart from in friendlies. I am looking forward to that.”