Kyle Walker was shown a late red card as Manchester City suffered a shock 2-1 defeat at RB Leipzig on Tuesday, but City still advanced to the Champions League's last 16 as group winners.
Walker sent off as Man City crash at RB Leipzig
Manchester City defender Kyle Walker (2nd L) is sent off at RB Leipzig
Walker was dismissed seven minutes from time for kicking Leipzig striker Andre Silva, who had earlier doubled the hosts' tally after Dominik Szoboszlai gave Leipzig a first-half lead.
"We showed today that with courage and will we can beat everyone," Szoboszlai told DAZN.
Before Walker's dismissal, City had pulled a goal back when Riyad Mahrez finally headed past Leipzig goalkeeper Peter Gulacsi, who had previously pulled off a string of saves.
Walker will now be banned for the first leg of the last 16 tie.
"Right now, we don't know exactly what went wrong - we'll have to sit down and analyse this," said City left-back Oleksandr Zinchenko.
"That we had won the group before the game had nothing really to do with our performance."
Despite PSG's 4-1 win against Club Brugge, City will go into Monday's draw as Group A winners while third-placed Leipzig head into the knock-out stages of the Europa League.
After the final whistle, City coach Guardiola could not hide his irritation on the sidelines at the near-deserted Red Bull Arena as the game was played behind closed doors due to high numbers of Covid-19 cases in Saxony.
"We had already qualified with one game left from a tough group so I am more than satisfied with the performance in every single (European) game," Guardiola said.
"We struggled in the first half today, but generally we have played well in the group stages."
Leipzig rallied in their first game since American coach Jesse Marsch was sacked after inconsistent results. His assistant Achim Beierlorzer was on the home bench.
"That was the reaction we had wanted - and expected - to see," said Leipzig chief executive Oliver Mintzlaff, who fired Marsch on Sunday.
In the build-up, Guardiola warned Kevin De Bruyne that he faces a fight to win back a regular place in the City side after a campaign marred by injuries and a coronavirus infection.
The Belgium midfielder fired wide after 17 minutes with the goal at his mercy, then had a thumping free-kick saved by Gulacsi in his best chances of the game.
Leipzig took the lead against the run of play when Konrad Laimer unleashed a superb pass which beat three defenders and put Szoboszlai in behind the City defence.
The attacking midfielder kept his nerve, rounded City goalkeeper Zach Steffen and fired into the empty net with 24 minutes played.
Leipzig nearly made it 2-0 with half-time approaching when Szoboszlai squared to Silva, but the Portugal striker headed straight at Steffen.
Guardiola responded at half-time by swapping England midfielder Phil Foden, who had an ankle knock, for Raheem Sterling, but Leipzig still held firm.
A huge roar from the home bench echoed around the stadium when Silva thumped home Emil Forsberg's final pass to make it 2-0 on 71 minutes.
Leaking a second goal caused City to rally and they pulled one back when Oleksandr Zinchenko floated in a cross to the back post which Mahrez buried.
Walker's dismissal only served to reduce City's numbers for the final seven minutes as Leipzig held on.