Jude Bellingham scored a stoppage-time winner for Real Madrid versus Getafe at the Santiago Bernabeu.
Borja Mayoral, a former Real Madrid striker, gave the visitors an early lead.
Joselu equalized in the second half, and Bellingham completed the comeback five minutes into additional time after building on the pressure.
Madrid’s fourth win in four games extends their lead at the top of La Liga to five points.
Getafe did not have on-loan Manchester United striker Mason Greenwood in their squad following his arrival on Friday, and they got off to a good start when Mayoral scored around Kepa Arrizabalaga and finished impressively despite Antonio Rudiger’s best efforts to recover.
Midway through the first half, England midfielder Bellingham thought he’d won Real a penalty, but VAR overturned the decision, and Luka Modric had a header pushed over the bar.
Joselu equalized after just two second-half minutes and a long VAR review, firing in from close range after the ball dropped sweetly from a magnificent Modric cross.
With Madrid desperate for a winner, Bellingham pounced after David Soria mishandled Nacho’s shot to secure Carlo Ancelotti’s side a fortuitous victory.
With his first goal at the Bernabeu, the 20-year-old has now scored in every game this season and is La Liga’s leading scorer with five goals.
The match was also the first to be played under the stadium’s retractable roof, with Real beginning the season with three away games while the construction work was completed.