Kylian Mbappe's strike 16 minutes from time gave record 15-time winners Real a lifeline at their Bernabeu home in a gripping battle. Vincent Kompany's side, arguably the strongest team in Europe this season, produced a masterclass in the first half and could have been several goals ahead.
Instead they had only one from Diaz, which Harry Kane added to after the interval, but Mbappe's goal kept Alvaro Arbeloa's side in the tie. The round's glamour fixture was a European classic - a record 29th time these teams have faced each other in the competition.
Bayern flew out of the blocks and Konrad Laimer's rasping effort narrowly over the bar showed that Kompany's side had come to the Spanish capital to attack. After nine consecutive matches against Madrid without a win, Bayern were determined to put an end to that streak and show why many consider them favourites to lift the trophy this season.