Cristiano Ronaldo scored a potentially vital late goal to leave Real Madrid trailing 2-1 heading back to the Bernabeu for the second-leg of their Copa del Rey round of 16 tie with Celta Vigo.

The home side impressed throughout and looked set to emerge from the Estadio de Balaidos on Wednesday night with a strong advantage. Goals from Mario Bermejo and a stunning strike from Cristian Bustos had put Celta 2-0 up in the second-half before Ronaldo struck with four minutes left on the clock.

Trailing Barcelona by 11 points in the La Liga standings, Madrid came into the contest knowing that realistically the Copa del Rey and the Champions League represented their only chances of silverware this season. Manager Jose Mourinho duly selected a strong lineup for the contest with a Celta side that lie in 15th in La Liga.

But Paco Herrera’s men defied that league standing as they took the lead in the 56th minute. Danish winger Michael Krohn-Delhi turned on the edge of the area before whipping a dangerous ball inside the six-yard box that allowed Bermejo to arrive at the back post and slide a low shot past Madrid backup keeper Antonio Adan.

Things would get even better for Celta in the 78th minute. Madrid lost possession from a throw-in inside their half and the ball was quickly fed to Bustos, who took the ball on before firing a shot that swerved away from Adan to nestle right in the top corner of the net.

At 2-0 down, Madrid were staring at a real uphill struggle in the second leg next month. But, as he so often does, Ronaldo came to the rescue. Xabi Alonso was given too much space in a central position midway inside the Celta half and the midfielder produced a pinpoint pass over the top to find Ronaldo, who finished left-footed first time high into the net.