The visitors opened the scoring after 14 minutes when a pass from Kaka beat the Amsterdam offside trap and put Jose Callejon in a scoring position.
Ajax, who needed a draw and also enjoyed a seven goal advantage over Olympique Lyon, were unlucky when first half goals by Nicolas Lodeiro and Vurnon Anita were ruled offside.
But four minutes before the interval Karim Benzema set up Gonzalo Higuain to double the lead and in the second half only Sulejmani came close to bring his side back in the match when his curved shot hit the bar. Callejon made it 3-0 for Real in stoppage time.
Ajax ended the night level on points with Olympique Lyon, 7-1 winners at Dinamo Zagreb, but were overtaken by the French side on goal difference.
Short link: