Having given themselves a mountain to climb in the Champions' League, they all but surrendered their slender hopes of catching Barcelona in the league with a defeat that leaves them 10 points behind the leaders.
Real started brightly and threatened to open the scoring on seven minutes when defender Sergio Ramos headed David Beckham's cross wide. And it was the same two players linking up on the half-hour mark that brought the breakthrough.
Beckham whipped in a free-kick and Ramos rose to head past Toni Prats in the Mallorca goal for his fourth goal of the season. But Beckham's night went downhill from there.
He saw Real surrender the lead seven minutes into the second half. Cristiano Doni was pulled back and the Argentinian striker Leonardo Pisculichi kept his cool to score from the penalty. The England captain was then replaced by Michel Salgado.
Beckham looked on from the bench as Juan Arango coolly rounded keeper Iker Casillas on the hour to condemn Madrid to their first defeat in the league this year.
Real Mallorca (4-4-2): Prats; Cortes, Ballesteros, Nunez, Navarro; Tuni (Campano, 77), Basinas, Pisculichi (Farinos 87), Guiterrez; Arango (Okubo 90), Doni. Substitutes not used: Moya, Victo, Yordi, Macia.
Real Madrid (4-1-4-1): Casillas; Cicinho, Sergio Ramos, Raul Bravo, Roberto Carlos; Gravesen; Beckham (Salgado, 64), Zidane, Baptista (Raul, 65), Robinho (Cassano, 77); Ronaldo. Substitutes not used: Cobeño, Mejia, Diogo.