Real Madrid suffered a major setback to their Spanish title hopes when they slumped to a 1-0 defeat at Real Betis on Saturday, handing Barcelona the opportunity to open an 11-point gap over their bitter rivals on Sunday.
Jose Mourinho's side remain eight points behind leaders Barcelona and five off city rivals Atletico who they host in the Madrid derby next Saturday.
Betis midfielder Benat Etxebarria's third goal of the season decided the game on Saturday.
All of his goals have been hit from outside the area, and he proved once again why Vicente del Bosque has been including him in recent Spain squads.
For Betis the result comes on the back of a disappointing 5-1 defeat to their local rivals Sevilla last Sunday and puts them four points behind Madrid in fifth.
Cristiano Ronaldo fired in two shots in the opening exchanges.
However, neither side had taken charge of the game when Benat hit what was to be the winner on 17 minutes.
Betis had played the ball into the corner only for Angel Di Maria to badly hook a clearance that the little midfielder controlled before evading the challenge of Sami Khedira to fire a drive past Iker Casillas.
Madrid continued to enjoy more of the possession and Di Maria twice went close to making amends for his mistake.
When Ronaldo crossed from the left the Argentinian was inches from levelling the game and moments later a Chechu Dorado block looped his goal bound shot over the bar.
Mourinho made two changes at half-time, as he has done on a number of occasions this season.
Luka Modric and Kaka replaced Khedira and Mesut Ozil as the Portuguese coach searched for more urgency going forward.
They started brightly with more purpose and Ronaldo and Kaka forced good saves from Adrian in the Betis goal.
At the other end Juan Carlos hit a venomous free-kick just over the bar.
Then Mourinho made an early last throw of the dice, replacing Di Maria with Jose Callejon on 62 minutes.
Madrid pressed in search of an equaliser leaving spaces that Betis were clever enough to expose and Salva Sevilla and Ruben Castro went close for the home side.
Adrian stood firm again to tip over a whipped free-kick from Ronaldo as Madrid's challenge uncharacteristically fizzled out on a night to forget for Mourinho's side.
Malaga thrashed rivals Valencia 4-0 to move behind Madrid into fourth level on 22 points with Betis.
Francisco Portillo fired the Costa del Sol side into an early lead on eight minutes and Javier Saviola should have doubled the lead before half-time when put through on goal only to slice his shot wide.
The Argentine made up for that miss by doubling the lead on 75 minutes. Roque Santa Cruz hit a third ten minutes from time before Isco rounded off a brilliant Malaga performance with a crisply struck shot.
Both teams qualified for the knock-out stages of the Champions League in midweek, but this win puts Malaga four points ahead of Valencia in the fight to qualify for next season's competition.
Also on Saturday there were home wins for Rayo Vallecano and Valladolid over Mallorca and Granada respectively.
Brazilian striker Leo Baptistao was the the hero for Rayo breaking the deadlock with a low drive on 87 minutes before turning provider two minutes later for Andrija Delibasic.
Former Manchester United striker Manucho powered home his fourth goal of the season with a second-half winner for Valladolid, making it four league goals for the Angolan this season.
On Sunday, Barcelona travel to Levant while Atletico Madrid welcome Sevilla.