Neymar scored twice to help Barcelona beat Villarreal 2-1 and take advantage of Real Madrid's slip as it opened up a five-point lead over its fierce rival at the top of the Spanish league on Saturday.
Third-place Madrid fell behind and settled for a 2-2 draw earlier at Osasuna in a match both sides finished with 10 men, and Barcelona didn't let the chance escape.
Barcelona, still without the injured Lionel Messi, again turned to Neymar after his hat trick against Celtic in the Champions League on Wednesday to convert a penalty on the half-hour mark and restore the lead in the 68th after Villarreal levelled.
Barcelona's eighth win in as many league games at Camp Nou this season provisionally lifted it three points clear of Atletico Madrid before it hosts Valencia on Sunday.
"We played well and knew how to pull out of the game," Barcelona coach Gerardo Martino said.
Other than Alex Song's shot off the upright from a corner kick six minutes in, the first half was a rather monotonous display of "tiki-taka" passing by Barcelona.
But all of Villarreal's discipline in defence was undone when right back Mario Perez used his arm to block Jordi Alba's pass, letting Neymar step up and stroke in the spot kick.
Villarreal didn't muster a shot on goal until defender Mateo Musacchio outmanoeuvred Marc Bartra to thump in a corner kick three minutes after halftime to unexpectedly even the score.
The pace picked up with Giovani Dos Santos going close for the visitors before Neymar put Barcelona back in charge when he tapped in Alexis Sanchez's short pass following his control of Cesc Fabregas' lobbed throughball.
Besides missing Messi as his hamstring heals, Barcelona will be without Neymar for next Sunday's game at Getafe after he received his fifth yellow card of the season, meaning he must serve a one-game suspension.
Osasuna's Oriol Riera headed in goals in the 16th and 39th before Madrid's woes deepened when Sergio Ramos received his second yellow card in the 44th.
With Cristiano Ronaldo unable to extend his eight-game scoring run for club and country, midfielder Isco Alarcon pulled one back before halftime and passed for Pepe to head home the 80th-minute equalizer seconds after Osasuna's Francisco Silva also earned his second booking.
"The team demonstrated it has a good attitude, but a draw is like a loss for us," Madrid defender Marcelo said. "We knew that the result wasn't good enough but we reacted too late."
Madrid's five-game winning run in the league ended at Reyno de Navarra Stadium, where it has only one victory in its last six visits.
Osasuna, which sits just two points above the relegation zone, has held both Barcelona and Madrid to draws there this season.
After Ronaldo missed two chances, Osasuna struck first when right back Marc Bertran dribbled by his marker and swung a cross to the far post where Riera was left unmarked to redirect the ball into the net.
Madrid momentarily lost both its verve in attack and composure in defence, and both centre backs Pepe and Sergio Ramos got yellow cards.
Riera was left free to finish off the rebound of Damia Abella's header from a corner kick that goalkeeper Diego Lopez sprung to palm off his line. And Ramos soon saw his second yellow card on a questionable decision when Osasuna's Roberto Torres fell after colliding with his arm.
"Our first 20 minutes were very good. It's unbelievable that we were then down 0-2 and playing with 10 men," Madrid coach Carlo Ancelotti said. "It's difficult to explain."
Just when Madrid was at its lowest, Ronaldo dribbled into the Osasuna defence and laid off for Isco to place a right-footed strike just inside the upright and pull one back before the break.
Osasuna still appeared set for victory after a placid second half until Silva earned himself two yellow cards in a four-minute span. Isco found the hole left in the defence which Pepe exploited to score Madrid's second and salvage a point.
Elsewhere, Granada moved into the upper half of the standings by prevailing 2-0 at 10-man Rayo Vallecano in an error-plagued match, which included Granada's Youssef El Arabi wasting a golden chance, Rayo letting Fran Rico's harmless cross bounce into its net, and Rayo defender Ignacio Martinez drawing a second yellow for diving in the box.
Malaga edged Getafe 1-0 at home to get a much-needed win and take some pressure off first-year coach Bernd Schuster. Striker Roque Santa Cruz went on in the 74th and a minute later headed in the winner.