Midfielder Remo Freuler was sent off by referee Tobias Stieler with just 17 minutes played for a foul on Mendy. Madrid found it difficult to capitalise in the first half, though, as Isco, Luka Modric and Vinicius Junior all shot off target. Their best chance came as Toni Kroos' free kick found Casemiro, whose header was well saved by keeper Pierluigi Gollini.
After the break, Modric had a shot deflected wide and Vinicius fired over the bar from close range. Madrid continued to struggle to create clear-cut opportunities, before Mendy finally broke the deadlock with a long-range effort in the 87th minute.
Mendy's late goal was a huge, huge relief. Flying home from Italy with a goalless draw, having faced 10 men for more than 70 minutes, would have been a major embarrassment after what was an uninspired display. The full-back's stunning strike changed the shape of the tie and makes Madrid firm favourites to progress to the quarterfinals, even if their prospects beyond that are dubious.
The pre-match chatter focused on Isco, brought in for one of Madrid's biggest games of the season after being exiled from the team for so long. It was by no means a perfect performance, but it was an encouraging one, and the playmaker was involved in much of what the team did well before being withdrawn.
They may have got the win, but this was often a desperately frustrating game from Real Madrid. They didn't put Atalanta under nearly enough pressure and were often reduced to optimistically shooting from distance. There are mitigating factors -- primarily, the major injury crisis -- but it's hard to escape the feeling that this is a team that is well past its best and no longer among Europe's elite.
Vinicius remains a hugely frustrating player: so much natural ability and so many admirable qualities, but so little end product. Here he had a poor night, failing to work the goalkeeper whenever an opportunity presented itself. There's still faith in the Brazilian at senior level at Real Madrid -- you wonder if Zinedine Zidane feels the same way.
Manager rating out of 10
6 -- Zidane sprung a surprise in his starting XI, dropping Mariano Diaz to play without a centre-forward. Instead, the team lined up with Isco in a withdrawn, central role, and Vinicius and Marco Asensio on either flank. The result was largely disappointing.
As Vinicius struggled, Zidane acted swiftly in bringing on Mariano, but the team remained flat. With nine players still out injured, there weren't any other experienced options to turn to, and Zidane had no choice but to turn to kids Sergio Arribas and Hugo Duro.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
GK Thibaut Courtois, 6 -- Didn't have a single save to make on the night.
DF Raphael Varane, 6 -- Did a good job of keeping Atalanta's much-vaunted forward line quiet, although the early red card meant the hosts barely threatened.
DF Nacho, 7 -- Has done well lately. Got into the box well in the first half before unleashing a wild cross-shot.
DF Ferland Mendy, 8 -- Had the biggest impact of any player on the night. Fouled early on for the red card as he embarked on what's becoming a trademark burst forward, and then scored a superb goal -- his first in this competition -- in the last few minutes.
MF Casemiro, 8 -- Will miss the second leg after picking up a soft yellow card, which is really bad news given his importance to the team. Looked concerned he might pick up a second later on when he went down easily in the box. Had Madrid's best first-half chance with his header.
MF Toni Kroos, 8 -- His 308th Madrid game, equalling the legendary Uli Stielike as the German with the most appearances for the club. A pinpoint free kick delivery for Casemiro's header.
MF Luka Modric, 7 -- Shot over the bar in the first half, just wide after half-time, and then over the bar again. A busy, lively performance.
MF Isco, 7 -- An unexpected start. Supposedly a false nine, although that really meant taking up familiar, advanced midfield positions. Did quite well: one first-half chance was deflected wide, and played in Vinicius with a lovely pass too.
FW Vinicius Junior, 5 -- Caught by goalkeeper Gollini in the first half. Shot off target multiple times and was withdrawn early. Not the ideal player to lead the line, given that he hasn't scored in four months.
FW Marco Asensio, 5 -- A quiet first half and very little improvement after that. Asensio goes missing in games far too often for a player with so much talent.
FW Mariano Diaz, 6 -- Being left on the bench was a humiliation, Zidane preferring to play with no striker at all. Came on for Vinicius and failed to threaten the Atalanta goal in more than a half an hour on the pitch.
FW Sergio Arribas, N/R -- Came on for Asensio with 15 minutes remaining and showed some nice touches.
FW Hugo Duro, N/R -- Made his Champions League debut, replacing Isco. Had a shot blocked.