Updated

Cristiano Ronaldo stood over a free kick late in Real Madrid's Champions League battle against Borussia Dortmund on Tuesday, and the former world player of the year stepped aside for Mesut Ozil.

Ozil did not waste the opportunity.

The German international drove a free kick from 22 yards over the wall and off the inside of the right post in the 89th minute, giving Real Madrid a 2-2 draw at the Bernabeu that left the Spanish side in contention for first in Group D.

Dortmund had its first lead on a strike from Marco Reus just before the half- hour mark and, after a goal from Real defender Pepe, restored a one-goal edge with an own goal late in the first half.

With Dortmund poised to finish off a sweep of their two matches against Madrid in group play, Ozil lined up a left-footed shot while Ronaldo stood a few feet to his left.

With everyone expecting Ronaldo to take the free kick, as he usually does, the hosts gave Ozil the shot and he fooled Dortmund goalkeeper Roman Weidenfeller. The shot went perfectly past the wall and kissed off the inside of the post.

Real Madrid used the point to remain within one point of Dortmund for first in their group, while Ajax remained three points back in third after a 2-2 tie in England against Manchester City in the other match in the group.

Dortmund would have opened a four-point cushion with a win, but the group will remain up for grabs headed into the final two matches.

Siem De Jong scored twice inside 17 minutes as Ajax grabbed a two-goal lead at Etihad Stadium, but Yaya Toure cut the deficit in the 22nd for City and Sergio Aguero tied the match with 16 minutes remaining.

City was denied a late penalty appeal from Mario Balotelli as its hopes of the knockout round remain in doubt as it is five points behind Real and six behind Dortmund with two matches to play.

In Group B, Schalke maintained its one-point lead over Arsenal thanks to a 2-2 draw at Veltins Arena, but Olympiacos joined the knockout race with a 3-1 win over Montpellier.

Theo Walcott and Olivier Giroud had Arsenal ahead by two just 26 minutes into the match in Germany, but Klaas-Jan Huntelaar scored in first-half extra time and Jefferson Farfan followed midway through the second half for Schalke.

Leandro Greco and Kostas Mitroglou scored two minutes apart late in the match, and Olympiacos remained third but moved within two points of Schalke for first and just one point of Arsenal.

In Group C, Alexandre Pato scored with 17 minutes remaining as AC Milan denied Malaga with a 1-1 draw at the San Siro in Italy, but the Spanish side clinched a spot in the knockout stage anyway.

Eliseu scored five minutes before half for Malaga, which will finish among the top two in the group. Milan is second on five points, but has competition for the other spot.

Dieudonne Mbokani scored as Anderlecht beat Zenit, 1-0, to move to four points with two matches remaining. Zenit is also alive with three points.

In Group A, FC Porto also punched its ticket to the knockout round with a 0-0 draw against Dynamo Kyiv, and PSG inched closer to a spot in the next round as it crushed Dinamo Zagreb, 4-0.

Porto has 10 points with two matches remaining, and only PSG can overtake the current leaders in the group.

Alex, Blaise Matuidi, Jeremy Menez and Guillaume Hoarau scored for PSG, all on assists from Zlatan Ibrahimovic, as the French side remained one point behind Porto in second place.