Cristiano Ronaldo scored both Real Madrid's goals in a 2-0 win over Malaga on Sunday but was later red-carded for deliberately elbowing defender Patrick Jan Mtiliga in the face.
Ronaldo ended a three-game scoring drought in the 35th minute when Karim Benzema played the ball to Kaka, who crossed to the Portuguese winger to slot the ball home from close range.
Ronaldo then scored his ninth goal of the season four minutes later, firing the ball into the roof of the net after being put through by Jose Maria (Guti) Gutierrez.
But the Portugal forward's temper got the better of him 20 minutes from time as he lashed out with his elbow, striking Mtiliga in the face.
Mtiliga was substituted with blood pouring from his nose.
Madrid's 10th straight home win allows it to stay within five points of Barcelona, who won 3-0 at Valladolid on Saturday.
Ronaldo's sending off means the world's most expensive footballer will miss at least one game through suspension just when Madrid's main rival is in sublime form after finishing the first half of the season unbeaten.
Barcelona has 49 points and Madrid 44, while Valencia is third with 39 points after a 0-0 draw against Tenerife. Mallorca went fourth — tied with Deportivo La Coruna at 34 points — after rallying for a 1-1 draw at Espanyol with a late penalty.
Pablo Osvaldo put Espanyol ahead at the Cornella-El Prat Stadium in the 49th after slotting home a loose ball. But Victor Ruiz brought Ruben Gonzalez down inside the area to set up Borja Valero's 80th-minute penalty for Mallorca.
Day marked season's midpoint
In Sunday's other games, which capped the first half of the season, it was: Getafe 1, Atletico Madrid 0; Sporting Gijon 0, Racing Santander 1; Villarreal 4, Zaragoza 2; and Xerez 1, Osasuna 2.
Getafe ended a two-game losing streak when Manu del Moral scored at the far post after being picked out by Pedro Leon's pass across the face of the goal in the 39th minute.
Atletico played the final 23 minutes with 10 men after Paulo Assuncao was red-carded as the Spanish capital club slumped to defeat after a three-game winning run.
Joan Capdevila scored after three minutes and strikers Nilmar and Giuseppe Rossi also added goals inside 26 minutes for Villarreal.
But Zaragoza, which stayed second bottom, started its rally in the 75th when Eliseu latched on to Humberto Suaro's cross to score and Angel Lafita added a second seven minutes later.
But Villarreal ensured its first win in over a month through Ariel Ibagaza's 88th-minute goal.
Javier Camunas' 83rd-minute strike brought Osasuna victory and new Xerez coach Nestor Gorosito defeat in his first game in charge of the last-place club.
Ignacio Monreal latched on to a rebound to score in the ninth minute for Osasuna. Xerez, which hasn't won since October, equalized through Mario Bermejo's 23rd-minute header before Camunas grabbed the winner.
At El Molinon, Alex Geijo received Mohamed Tchite's pass with his chest and controlled the ball before firing past goalkeeper Juan Pablo Colinas from inside the area in the 44th minute for Racing, which had defender Oriol Lazano sent off in the 89th.
On Saturday, Sevilla beat Almeria 1-0 and Deportivo won 3-1 over Athletic Bilbao.