The Dutch giants put in a strong display against the Primera Division leaders, but saw their Champions League ambitions come to an end following some shocking refereeing errors
Jose Callejon gifted Madrid the lead early on with a calm finish after being set up by Kaka. Ajax then thought to have equalised twice, but goals from Nicolas Lodeiro and Miralem Sulejmani were wrongly disallowed. Gonzalo Higuain then showed his class as he made two for the guests in the closing stages of the first half. Callejon again escaped the offside trap well into stoppage time to add a third for Madrid.
The away side enjoyed the majority of possession in the opening stages of the game, and deservedly opened the scoring in the 14th minute. Kaka set up Jose Callejon with a brilliant pass over the defence and the former Espanyol star kept his calm to slot the ball past the Ajax goalkeeper from inside the area.
Karim Benzema then came close to doubling Madrid's lead after a good individual action, but the Frenchman's low shot was kept out by Kenneth Vermeer.
Ajax then took over the initiative and the Amsterdam side thought they had restored parity in the 31st minute. Antonio Adan failed to hold on to Gregory van der Wiel's shot and Nicolas Lodeiro was alert to head home the rebound. Nevertheless, the assistant referee waved his flag and the goal was wrongly disallowed.
The refereeing trio again got it all wrong hardly minutes later when Ajax again found the net, this time via Miralem Sulejmani. Nevertheless, the goal was again wrongly disallowed as the Serbian was adjusted to be in an offside position when he deflected Vurnon Anita's shot past the shot stopper.
The Eredivisie giants were dealt yet another huge blow in the 41st minute. Gonzalo Higuain escaped the attention of Daley Blind after a superb Benzema pass and the Argentine showed good control before doubling Madrid's lead with a calm finish.
Ajax continued to push forward after the interval and really should have pegged one back via Jan Vertonghen. Nevertheless, the Belgian centre-back headed just wide from six yards after a corner kick from the right.
Minutes later, the Dutch champions again came close to making it 2-1, but Sulejmani's delicately lofted shot came back off the crossbar, before the Madrid defence cleared the ball into safety.
Real Madrid didn't create any clear cut chances in the second half, but they tried their luck from long range a number of times. However, both Esteban Granero and Xabi Alonso failed to really worry Vermeer between the sticks.
Callejon poured even more salt in Ajax's wounds well into stoppage time as he again beat the offside trap before rounding Vermeer and doubling his personal tally.
Real Madrid have won Group D with a perfect score of 18 points from six games, while Ajax have to settle for Europa League action as the section's number three on goal difference.
The Spaniards resume domestic action on Saturday when they take on arch-rivals Barcelona at the Santiago Bernabeu, while Ajax's next match is the Eredivisie game away against minnows RKC on Sunday.
How do you stay up to date with football when on the move? With http://m.goal.com – your best source for mobile coverage of the beautiful game.