Rodrygo’s late strike gave Real Madrid victory over Inter Milan – their first Champions League win of the season.
Real looked in control when Karim Benzema rounded Samir Handanovic to put them ahead and Sergio Ramos headed in his 100th goal for the club.
But moments later Lautaro Martinez scored from Nicolo Barella’s backheel pass and Ivan Perisic levelled with a composed finish from a Martinez header.
Rodrygo was Real’s hero with a powerful effort from Vinicius Jr’s pass.
Real are level on four points with second-placed Shakhtar Donetsk, one point behind leaders Borussia Monchengladbach. Inter are bottom on two points.
Gladbach thrashed Shakhtar 6-0, with Alassane Plea scoring a hat-trick, with his first three Champions League goals.
Real rally after being pegged back
Real Madrid, European champions for a record 13 times, were bottom of the group after losing 3-2 to Shakhtar and drawing 2-2 with Gladbach.
They were without a win in four Champions League matches including last season’s last-16 elimination by Manchester City.
At one stage it looked as though they were going to have a comfortable night at the Alfredo di Stefano Stadium at their training base, which remains their temporary home while the Bernabeu is being redeveloped.
Achraf Hakimi’s terrible backpass, against the team he left in the summer, let Benzema round the Inter keeper before opening the lead.
Ramos then headed in a landmark goal for Real from Toni Kroos’ corner. That was his 55th headed goal and he becomes only the 19th player to reach a century of Real goals.
But that 2-0 lead only lasted two minutes as Martinez scored from a brilliant flicked assist from Barella, who also hit the bar with a header.
It was Martinez who provided Perisic with the ball to level in the first half, and at that stage Inter looked the more likely winners with Martinez curling just wide and Perisic flashing a shot the wrong side of the post.
But Real’s substitutes combined as Vinicius Jr picked out Rodrygo for a thunderous winner.
Now it is the turn of Inter to sit bottom of the group without a win. Antonio Conte’s side have only won one of their past seven games in all competitions.
Real leaky at the back again – match stats
- Real Madrid have won seven of their eight home matches against Inter Milan (L1), winning each of the past six.
- Real Madrid have conceded two or more goals in five consecutive Champions League games for just the second time (also in 2001).
- Only Lionel Messi (70) and Cristiano Ronaldo (63) have scored more group stage goals in the Champions League than Benzema (49).
- Since the start of last season, only Robert Lewandowski (11) and Serge Gnabry (six) have scored more away goals in the Champions League than Martinez (five).
- Rodrygo has had a direct hand in eight goals in eight Champions League appearances for Real Madrid (five goals, three assists).
- Casemiro made his 250th appearance for Real Madrid in all competitions, with 169 of them coming under Zinedine Zidane. Only Benzema (181) and Kroos (175) have played more games under Zidane.
- Watch 13 first-round ties on iPlayer and the BBC Sport website and app this weekend. Find out more here.
- 1CourtoisBooked at 90mins
- 23MendyBooked at 48mins
- 15ValverdeBooked at 62mins
- 14CasemiroBooked at 85mins
- 8KroosSubstituted forModricat 78′minutes
- 11AsensioSubstituted forRodrygoat 64′minutes
- 7E HazardSubstituted forVinícius Júniorat 64′minutes
- 20Vinícius Júnior
- 6de Vrij
- 23BarellaBooked at 72minsSubstituted forGagliardiniat 78′minutes
- 77BrozovicBooked at 51mins
- 22VidalBooked at 44minsSubstituted forNainggolanat 87′minutes
- 14PerisicSubstituted forSánchezat 78′minutes
Match ends, Real Madrid 3, Inter Milan 2.
Second Half ends, Real Madrid 3, Inter Milan 2.
Corner, Real Madrid. Conceded by Samir Handanovic.
Attempt saved. Karim Benzema (Real Madrid) right footed shot from the centre of the box is saved in the bottom right corner. Assisted by Luka Modric.
Thibaut Courtois (Real Madrid) is shown the yellow card.
Foul by Sergio Ramos (Real Madrid).
Lautaro Martínez (Inter Milan) wins a free kick in the defensive half.
Attempt blocked. Marcelo Brozovic (Inter Milan) right footed shot from outside the box is blocked. Assisted by Lautaro Martínez.
Substitution, Inter Milan. Radja Nainggolan replaces Arturo Vidal.
Attempt missed. Danilo D’Ambrosio (Inter Milan) left footed shot from a difficult angle on the left is high and wide to the left. Assisted by Achraf Hakimi following a set piece situation.
Attempt blocked. Alexis Sánchez (Inter Milan) right footed shot from outside the box is blocked.
Casemiro (Real Madrid) is shown the yellow card for a bad foul.
Foul by Casemiro (Real Madrid).
Lautaro Martínez (Inter Milan) wins a free kick in the attacking half.
Hand ball by Karim Benzema (Real Madrid).
Goal! Real Madrid 3, Inter Milan 2. Rodrygo (Real Madrid) right footed shot from the centre of the box to the top right corner. Assisted by Vinícius Júnior with a cross.
Substitution, Real Madrid. Luka Modric replaces Toni Kroos.
Substitution, Inter Milan. Alexis Sánchez replaces Ivan Perisic.
Substitution, Inter Milan. Roberto Gagliardini replaces Nicolò Barella.
Ferland Mendy (Real Madrid) wins a free kick in the attacking half.