MANCHESTER: Manchester City’s Julian Alvarez scored in the 87th minute as the European champions clawed their way back from two goals down to beat RB Leipzig 3-2 and clinch top spot in Champions League Group G on Tuesday with one round of matches remaining.

Erling Haaland and Phil Foden also netted in the second period after one of City’s most underwhelming recent first-half performances to give Pep Guardiola’s team 15 points after five games. Leipzig, who had also reached the last 16, have nine.

“First half was the worst I’ve seen us,” midfielder Foden told TNT. “Courage and motivation changed it around. This team has great mentality and its so nice to see.”

Haaland added another record to his bulging resume, becoming the fastest player to 40 Champions League goals. The striker became the quickest to 50 Premier League goals on Saturday.

Lois Openda pounced on a pair of City defensive blunders for both Leipzig goals, sprinting onto a long ball from goalkeeper Janis Blaswich that bounced over a lackadaisical Manuel Akanji in the 13th minute. He struck again with seemingly similar ease in the 33rd, spinning around Ruben Dias en route to scoring.

“We had to be as relaxed as possible and we reacted really well,” Guardiola told TNT. “We are first in the group and I am very satisfied for the reaction at the end. The team runs and fights and has spirit.”

Haaland, who poured in five goals against Leipzig in a 7-0 rout in the Champions League last 16 in March, finally gave City fans something to cheer in the 54th minute when he ran onto a pass from Foden and struck a low left-foot shot into the net.

“We just needed that (first) goal to get going,” Foden said. “Even the fans were a lot louder after the goal. Once the first went in the motivation was there. We’ve got a great record at the Etihad and it only takes one goal to change things.”

City levelled with Foden’s excellent first touch and finish in the 70th and Alvarez fired the hosts ahead when Foden’s pass was deflected into his path for a close-range effort.

“What I told the guys was that we made (City) angry in the first half,” Leipzig manager Marco Rose told reporters. “If we kept the clean sheet a little bit longer, maybe then the chance became bigger to win or to take something home.”

Guardiola’s side narrowly avoided their first defeat in European competition at the Etihad since a group stage loss to Olympique Lyonnais in 2018, which was also the last time City trailed by two goals the Champions League.

Three days after their 1-1 top-of-the-table Premier League draw with Liverpool, City looked like zombies through the first half, although they had a flurry of chances before the break, their best being Dias’s header over the bar.

It was Guardiola’s second comeback from a two-goal deficit in his Champions League managerial career after his Bayern Munich side rallied to beat Juventus in the 2016 quarter-finals.

City finish the group stage at Red Star Belgrade on Dec. 13.

Young Boys, who are third on four points, secured a place in the Europa league knockout round playoffs with a 2-0 home win over Red Star. The Belgrade side are bottom with one point.