Kylian Mbappe scored on his first Champions League appearance for Real Madrid as the holders started their trophy defence with a 3-1 win over Stuttgart on Tuesday.
Antonio Rudiger headed home in the 83rd minute for the record 15-time champions after Deniz Undav had levelled Mbappe's opener just seconds into the second half.
Endrick, another Champions League debutant, wrapped up Madrid's win with a low drive in stoppage time.
Stuttgart had the better of an entertaining opening period but Carlo Ancelotti's team have a habit of grinding out victories when up against the wall and they took the three points despite the visitors' impressive efforts.
"I think that in the first 25 minutes they did us a lot of damage. After that we improved and we were able to score," Madrid goalkeeper Courtois told Movistar.
"The win is very important in this new Champions League format."
Mbappe reached five goals for the season in seven appearances across all competitions by opening the scoring when he raced into space at the start of the second half.
"There's a lot of space behind them and that's how the first goal came about... (but) we didn't know how to take full advantage of it," added Courtois.
Ancelotti selected full-back Dani Carvajal in central defence with Eder Militao not fit enough to start, while Jude Bellingham and Aurelien Tchouameni returned from injury to play in midfield.
Madrid have lacked a certain balance after stalwart Toni Kroos retired in the summer and the game lurched from end to end under the Santiago Bernabeu lights.
Bundesliga side Stuttgart had more of the ball and the most dangerous chances in the first half, with Enzo Millot heavily involved.
The French midfielder dragged an early shot wide and forced Thibaut Courtois to tip over his dangerous effort from range, the best of a handful of saves by the Belgian.
At the other end Mbappe had two shots saved by Alexander Nubel as he sought his first Champions League goal for Madrid.
Rodrygo had a shot narrowly deflected over while Madrid were awarded a penalty when Maximilian Mittelstadt appeared to catch Rudiger with a clumsy swipe, but the referee cancelled the decision after a VAR referral showed no contact was made.
Courtois thwarted Angelo Stiller and Undav hit the crossbar for Stuttgart, but they were brought crashing down to earth at the start of the second half.
Mbappe opener
Just 21 seconds after the interval Mbappe found the net, teed up unselfishly by Rodrygo. It was blink-and-you'll-miss-it and many did, still on their way back to their seats from the Bernabeu bars.
The former Paris Saint-Germain striker was not able to win the club game's biggest prize while playing in France and his desire to lift the trophy matches Madrid's obsession with it.
Stuttgart did not get the memo and after Vinicius crashed an effort against the crossbar, the German side levelled.
Jamie Leweling came close himself with a flurry of attempts before hooking a corner back into the danger area for Undav to head past Courtois.
Ancelotti sent 18-year-old Brazil striker Endrick on for the final 10 minutes, hunting a winner to get the holders' trophy defence off to the perfect start.
The goal arrived swiftly but not from Madrid's galaxy of attacking stars, but instead centre-back Rudiger, who nodded home from Luka Modric's corner in the 83rd minute.
Vinicius missed a golden chance to seal Madrid's win but his compatriot Endrick made no mistake with his only opportunity, drilling home from the edge of the box at the death.
The forward opted not to pass to his more experienced team-mates and took his shot early, catching out goalkeeper Nubel.
"He's a kid with a lot of quality and he showed it," added Courtois.
"Obviously he showed personality by not passing to Vini or Kylian and shooting there himself."