Real Madrid, the defending Champions League champion, suffered their first loss of the year as RB Leipzig increased their chances of moving on to the round of 16.
Before France attacker, Christopher Nkunku extended the advantage, Croatian defender Josko Gvardiol gave the hosts the lead.
Although Timo Werner, an ex-Chelsea attacker, ensured that RB Leipzig would win, Vinicius Jr. helped cut the gap.
READ MORE: Chelsea advance to the last 16 of the Champions League as group winners
Rodrygo’s penalty kick gave Real, who had already advanced to the knockout round, a late second.
With Celtic defeating Shakhtar Donetsk in Glasgow in the other Group F match, RB Leipzig is now in the second position with nine points, three more than third-placed Shakhtar.