Real Madrid is used to breezing through the Champions League, rather than facing must-win matches near the end of the group stage.

But poor performances this season have left Zinedine Zidane’s team needing a victory on Wednesday against Borussia Mönchengladbach to ensure the record 13-time European champions don't miss out on the knockout phase for the first time in the club's Champions League history.

With a draw, Madrid can still squeak through to the round of 16 if Shakhtar Donetsk loses at Inter Milan.

Real Madrid's Karim Benzema, left, challenges for the ball with Sevilla's Jules Kounde during the Spanish La Liga soccer match between Sevilla and Real Madrid at the Ramon Sanchez Pizjuan stadium in Seville, Spain, Saturday Dec. 5, 2020. (AP PhotoAngel Fernandez)

Real Madrid's Karim Benzema, left, challenges for the ball with Sevilla's Jules Kounde during the Spanish La Liga soccer match between Sevilla and Real Madrid at the Ramon Sanchez Pizjuan stadium in Seville, Spain, Saturday Dec. 5, 2020. (AP PhotoAngel Fernandez)

Madrid has never failed to get past the group stage in its 25 previous campaigns. Before falling in last season's round of 16, Madrid had reached at least the semifinals for eight consecutive seasons, winning the title four times in that stretch.

Lionel Messi's latest meeting with old rival Cristiano Ronaldo features as the other main attraction in the last of the group games. Messi's Barcelona hosts Ronaldo's Juventus on Tuesday with both already qualified.

Group B has proven to be the most competitive. Gladbach leads it with eight points. Madrid and Shakhtar each have seven, two more than last-place Inter. All four can still advance, and all four can still miss out.

Barcelona's Lionel Messi controls the ball during the Spanish La Liga soccer match between Cadiz and FC Barcelona at the Ramon Carranza stadium in Cadiz, Spain, Saturday Dec. 5, 2020. (AP PhotoAlvaro Rivero)

Barcelona's Lionel Messi controls the ball during the Spanish La Liga soccer match between Cadiz and FC Barcelona at the Ramon Carranza stadium in Cadiz, Spain, Saturday Dec. 5, 2020. (AP PhotoAlvaro Rivero)

When Gladbach hosted Madrid in October, the German club was leading 2-0 until Karim Benema and Casemiro scored late to salvage a 2-2 draw.

Madrid’s only two wins both came against Inter. It was beaten twice by Shakhtar.

Struggling in attack, Madrid has also had problems in defense, conceding nine goals in five group games, its worst defensive record up to this point in the competition. A hamstring injury has sidelined defensive leader Sergio Ramos for the last two weeks. Injuries to right backs Dani Carvajal and Álvaro Odriozola have forced Zidane to play a forward, Lucas Vázquez, in their spot.

Juventus' Cristiano Ronaldo reacts during the Serie A soccer match between Juventus and Torino at the Allianz Stadium in Turin, Italy, Saturday, Dec. 5, 2020. (Marco AlpozziLaPresse via AP)

Juventus' Cristiano Ronaldo reacts during the Serie A soccer match between Juventus and Torino at the Allianz Stadium in Turin, Italy, Saturday, Dec. 5, 2020. (Marco AlpozziLaPresse via AP)

Madrid has underperformed for a squad of its caliber in the Spanish league as well. It had gone three rounds without a win until it eked out a 1-0 victory at Sevilla last Saturday thanks to a goalkeeping blunder.

“We’re going through a bit of a tough spell lately,” Zidane said after the win at Sevilla. “The recent days have been difficult, (but) this team is full of character. It thrives on challenges and this win is hugely important for what is to come”.

Gladbach can go through with a draw. In the case of a loss at the Alfredo Di Stéfano Stadium, it would need Shakhtar and Inter to draw.

STALEMATE

Two of the trio of Paris Saint-Germain, Manchester United and Leipzig will advance from Group H; the other having to settle for the Europa League. All three are tied on nine points.

Last year’s losing finalist PSG can win the group with a victory over eliminated Istanbul Basaksehir on Tuesday. It can even advance with a loss as long as United's game at Leipzig does not end in a draw.

A draw in Germany would be enough for United. Leipzig will aim to beat United because a draw will leave the German team needing Basaksehir to upset PSG.

If he plays, PSG star Kylian Mbappe will be trying to break his 13-match, nine-month scoring drought in the Champions League.

Here's a look at other group games:

TUESDAY

GROUP E

Chelsea welcomes Krasnodar and Sevilla is at Rennes with absolutely nothing at stake. Chelsea is already through as group winner and Sevilla is through in second place. Krasdonar is going to the Europa League; Rennes will place fourth.

GROUP F

Borussia Dortmund is already classified but can claim the group outright if it wins at eliminated Zenit St. Petersburg. Lazio can advance for the first time in 20 years if it avoids defeat against Brugge, which must win in Rome to progress to the next stage.

GROUP G

Barcelona will win the group unless Juventus can overtake it in head-to-head goals. Barcelona won 2-0 in Turin. Ronaldo missed that possible rematch with Messi after catching the coronavirus.

The two best players of their generation have not faced another since Ronaldo left Real Madrid in 2018.

Dynamo Kyiv hosts Ferencvaros. Both teams have one point.

WEDNESDAY

GROUP A

With defending champion Bayern Munich already through as group winners, the second spot is down to either Atlético Madrid or Salzburg when they face off in Austria.

Diego Simeone’s Atlético has only lost once in all competitions this season. A draw is enough to send it through, while Salzburg must win.

Bayern is likely to rest players for its game against Lokomotiv Moscow. Lokomotiv must win to have hope of taking third place and a Europa League spot.

GROUP C

Manchester City and FC Porto have already booked their spots in the last 16. Olympiakos faces Porto, while City hosts Marseille. Olympiakos will take the Europa League berth as long as it matches the result of Marseille.

GROUP D

Liverpool is already through, leaving Atalanta and Ajax to decide who joins the English champions. Atalanta can go through with a win or draw in Amsterdam. Liverpool visits Danish club Midtjylland.

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports