Real Mallorca travelled to Real Madrid on Saturday knowing that three points would have moved them out of the relegation zone in La Liga.
It was the away side that took the lead early on when Emilio Nsue headed home from close range, but Gonzalo Higuain levelled the scores after 15 minutes.
Mallorca were ahead once more six minutes later, however, when Alejandro Alfaro headed a Giovani dos Santos corner into the back of the net.
Three goals in five second-half minutes turned the match in Madrid's favour, however, with Cristiano Ronaldo, Luka Modric and Higuain moving the home side into a 4-2 lead.
There was also time for Karim Benzema to get among the goals in the latter stages as he finished from close range following good work from Higuain.
Read how it all unfolded in Sports Mole's minute-by-minute live commentary of the action below.
REAL MADRID: Lopez; Arbeloa, Ramos, Varane, Coentrao; Pepe, Kaka, Modric; Ronaldo, Higuain, Morata
MALLORCA: Aouate; Hutton, Nunes, Kevin, Bigas; Tissone, Pina, Victor, Alfaro; Giovani, Nsue