The holders soaked up the pressure before Marco Asensio's late sucker punch snatched victory.
Article top media content
All you need to know in 60 seconds ...
Marco Asensio grabbed a late winner as Real Madrid closed in on a ninth successive UEFA Champions League quarter-final – but the holders were made to sweat in Amsterdam.
Ajax have had their problems of late, not least a bruising 6-2 loss at Feyenoord, yet at times here they were exhilarating. Dušan Tadić struck the post and Hakim Ziyech tested Thibaut Courtois before Nicolás Tagliafico found the net prior to the break. His effort, though, was disallowed following a VAR review.
Karim Benzema then rubbed salt in home wounds with the opener on the hour and though Ziyech cancelled that out, Asensio slid in with three minutes to go to leave Madrid in charge of the tie.
View from the stadium: Derek Brookman
What a bold performance from Ajax! Struggling for form, they matched the European champions in almost every department. There was, however, one crucial difference: Madrid were clinical, Ajax were not.
With a bit more composure in front of goal the Dutch side would be taking a lead to Spain in three weeks; instead they are behind.
Man of the match
Thibaut Courtois (Real Madrid)
It's not often a Merengues goalkeeper is decisive in a UEFA Champions League game, but the Belgian was on fine form. With the holders' backs to the walls in the first period, he kept them in it and while it will be the attackers that take the plaudits, boss Santiago Solari knows Courtois was key.
- Sergio Ramos became only the seventh man to make 600 appearances for Real Madrid (though he also earned a booking that rules him out of the second leg). He is one game away from matching Fernando Hierro and Francisco Gento in fifth on the club's all-time list.
- Ajax are seven matches without a win in the UEFA Champions League knockout stage, dating back to 1997.
- Karim Benzema is the fourth player to reach 60 UEFA Champions League goals after Raúl González, Lionel Messi and Cristiano Ronaldo.
- Vinícius Júnior has laid on a club best eight assists in all competitions for Madrid this season.
- Ajax suffered their first European defeat of 2018/19 – ending a run of 12 unbeaten games (W7 D5).
- Madrid are on course to make the quarter-finals for a ninth straight year; only Barcelona, 11 seasons and counting, have managed more.
- Ajax have suffered three defeats in their last four games in all competitions, as many as in the whole of 2018.
What does it mean?
The Blancos will be strong favourites to finish the job when the teams reconvene on 5 March, despite being outplayed for much of this first leg. The Bernabéu is a daunting place to go but, as CSKA Moskva demonstrated a couple of months ago, not impenetrable.
Ajax, six points adrift of leaders PSV, have three Eredivisie fixtures before the second leg, all against clubs in the bottom half of the table. They host NAC on Sunday and then travel to Den Haag (24/02) before welcoming Zwolle (02/03).
Madrid entertain Girona and visit Levante for Liga games on each of the next two Sundays; then the small matter of back-to-back Clásicos at the Bernabéu. First a Copa del Rey semi-final second leg on 27 February (currently 1-1), before a top-flight summit meeting on 2 March.