A review of this weekend's action in Spain's Primera Division.
Real Madrid overcame the early dismissal of Sergio Ramos to beat neighbours Rayo Vallecano 2-0 at the Bernabeu.
Spain defender Ramos was shown a red card in the 18th minute after collecting two soft bookings in the space of 30 seconds.
The first came after he brushed past Roberto Trashorras with the Rayo player theatrically going to ground and the second for a handball after Jose Manuel Casado fired a cross against his arm from close range.
By the time he departed, Madrid were already 2-0 up. Alvaro Morata, on his first league start, tapped home Mesut Ozil's right-wing cross in the third minute and Ramos himself grabbed the second with a powerful header from Ozil's inswinging free-kick.
Rayo had plenty of the ball in the second half but could not find a way past Madrid goalkeeper Diego Lopez.
Madrid remain third, four points behind city rivals Atletico and 16 adrift of runaway leaders Barcelona.
Ten-man Valencia claimed an unlikely 2-0 win to add to struggling Real Mallorca's relegation worries.
Things looked to be going wrong for the hosts when a slow start was compounded by having midfielder Tino Costa sent off in the 28th minute.
But Mallorca could not take advantage and went behind in the 59th minute when Ricardo Costa headed Valencia in front.
Roberto Soldado doubled the lead in the 81st minute to boost his side's top-four hopes and leave Mallorca rooted in the bottom three.
Espanyol's remarkable revival under coach Javier Aguirre continued as a solitary Sergio Garcia goal earned the Catalan club a third consecutive win.
Real Betis, though, are on the slide having failed to win in five attempts and Pepe Mel watched his charges struggle to convert a handful of half-chances at the El Prat.
The hosts, who were perhaps unlucky not to win by a larger margin, climb to 12th in the table ahead of a daunting trip to Atletico Madrid.
Christian Stuani set up the goal as he surged down the right wing to pick out Garcia, who steered his shot beyond Adrian.
Real Sociedad missed a chance to gain ground in their bid to qualify for the Europa League by drawing 1-1 with Levante at home.
Both goals came from penalties in the first half, scored by Carlos Vela for the hosts and Michel for the visitors, who played most of the second half with 10 men after left-back Nikos Karabelas was sent off for picking up two bookings.
On Saturday, Lionel Messi struck his 300th and 301st goals for Barcelona as the leaders overturned a half-time deficit to win 2-1 at plucky Granada.
Barca dominated possession for the first 25 minutes, but were stunned when Odion Ighalo put the hosts ahead at the Estadio Nuevo Los Carmenes.
Messi tapped in a deserved equaliser five minutes into the second half, though, and then curled in a trademark free-kick 17 minutes from time to complete the turnaround and move Barca 15 points clear at the summit.
A first half goal by Javier Saviola earned Malaga a 1-0 victory over Athletic Bilbao to ensure they will remain fourth by the end of the weekend.
The result was also the perfect morale-booster for the Andalusians ahead of their Champions League last-16 first-leg tie against Porto next week.
An early goal by Kike Sola saw Osasuna earn themselves some much-needed breathing space from the relegation zone with a narrow 1-0 win over Real Zaragoza.
Osasuna have scored fewer goals than any other Primera Division side this year and boast the joint fourth tightest defence, so when Sola rose in the box to head in a cross from Abella Damia and score with less than four minutes gone, it was no surprise that they chose to sit back for the rest of the game and attack with caution.
The visitors had far more possession but were outmuscled by their opponents and although they had marginally more attempts on goal, it was the hosts who looked more likely to score.
Zaragoza's best attempt came late in the first half, with Ruben Rochina getting on the end of a cross by Fernandez Abraham but his effort was superbly turned away by Osasuna goalkeeper Andres Fernandez.
Celta Vigo remain in the relegation zone after suffering their third defeat in a row as they lost 3-1 at Getafe.
All the goals came in a frantic first half. Adrian Colunga opened the scoring for the hosts after 10 minutes but Augusto Fernandez equalised just 10 minutes later, before Diego Castro and then Federico Fernandez added goals of their own before the break.
Deportivo La Coruna had a new coach but it was the same old story as they fell to a 3-1 defeat at Sevilla on Friday night to remain adrift at the foot of the standings.
Fernando Vazquez took over during the week with the tough task of steering the Galician side to safety, and he got a first-hand look of how much work there is to do as Deportivo quickly fell behind on the road to Ivan Rakitic's fifth-minute goal.
Gary Medel got another in the 27th minute and although Ivan Riki soon replied for Depor, any hope of a comeback was quickly snuffed out by Medel's second.
Depor showed plenty of heart as they sought a way back into the game late on, but Antonio Beto made a string of saves to keep them out.