Cristiano Ronaldo won and missed a penalty, scored a goal and was then sent off as Real Madrid came back to beat Almeria 4-2 at the Estadio Bernabeu in La Liga on Saturday.
Manuel Pellegrini's side looked to be cruising when Sergio Ramos headed them in front after 31 minutes but the visitors netted twice in four minutes midway through the second half.
Gonzalo Higuain levelled for Real in the 74th before their Portugal winger Ronaldo flung himself over Almeria goalkeeper Diego Alves to win a disputed penalty in the 81st.
Alves saved the spot kick but Karim Benzema converted the rebound and Ronaldo made it 4-2 two minutes later, picking up a yellow card as he celebrated by taking his shirt off.
In the last minute, Ronaldo kicked Almeria's Juanma Ortiz after a tussle for the ball, earning his second yellow card and was dismissed.
Lionel Messi scored twice as Barcelona bagged a hard-fought 3-1 win away to in-form Deportivo La Coruna.
Pep Guardiola's side had seen their lead at the top of the table cut back to two points just before taking to the field in Coruna, following Real Madrid's win.
Messi put Barca in front after 26 minutes, but Deportivo hit back later in the first half through Adrian Lopez. The game could have gone either way after that, but Barca's superior quality eventually told as Messi headed the Catalans back in front with 10 minutes remaining.
Zlatan Ibrahimovic rounded off an important victory for the visitors with a third goal right at the death.
Earlier, third-placed Sevilla were held 1-1 at home by 10-man Real Valladolid, bringing their La Liga title credentials into question for the second week in a row.
Manolo Jimenez's side have 27 points, having now dropped four points at the Sanchez Pizjuan in consecutive home games.
After lowly Malaga held them to a 2-2 draw last weekend, it was Valladolid's Angolan striker Manucho who put the visitors ahead with a superb diving header in the 33rd on Saturday.
Valladolid had Borja Valero harshly sent off for a late tackle after 39 minutes and just before the break Sevilla levelled when Luis Fabiano netted from the penalty spot.
But the hosts were unable to make the extra man count.
Diego Forlan and Sergio Aguero fired Atletico Madrid to a 2-0 win at bottom club Xerez for their first away win of the campaign and their second victory in a row.
Improving Atletico, who finished with 10 men after Alvaro Dominguez was sent off late on, climbed to 11th with 13 points.