Pepe's second-half goal gave Real Madrid a 1-0 victory at Espanyol on Sunday, pulling the winners to within three points of the Spanish co-leaders.
Pepe was left unmarked to head in Luka Modric's corner kick in the 55th minute, as Cristiano Ronaldo failed to add to his league-leading 20 goals.
Ronaldo is favored to win the FIFA's Ballon d'Or on Monday over Lionel Messi and Franck Ribery, but the Portugal forward uncharacteristically wasted two clear scoring chances, and goalkeeper Kiko Casilla denied him on another three occasions.
Third-place Real Madrid took full advantage of Saturday's scoreless draw between Barcelona and Atletico Madrid, which left them level at the top of the table at the league's halfway mark.
Also on Sunday, Real Betis remained last after slumping to an error-plagued 2-1 loss at home to Osasuna. Nothing went Betis' way against a direct relegation rival in a game both sides finished with 10 men.
Betis conceded Roberto Torres' header within two minutes, had Nono dismissed with his second yellow card in the 38th minute, and had Jordi Figueras score an own goal in the 57th.
And when Osasuna goalkeeper Andres Fernandez gave them a sliver of hope in the 62nd minute when he was red-carded for fouling Ruben Castro in the area, Castro deflated the crowd at Benito Villamarin Stadium by sending his penalty kick off the crossbar.
Jorge Molina pulled one back in the 80th minute but Osasuna squandered two chances to widen the margin before the final whistle.
Rayo Vallecano won 1-0 at Getafe's foggy Alfonso Perez Coliseum to end a five-game streak without a win in league play.
Forward Alberto Bueno scored what proved to be the winner in the 29th minute after Alejandro Galvez was quick to cross a rebounded shot.
Rayo's defenders blocked two shots on the goal line in the final minutes to ensure mid-table Getafe fell to its fourth league loss in a row.
Levante edged Malaga 1-0 at home thanks to David Barral's 19th-minute header.
Levante climbed past Malaga into the middle of the standings.
Information from The Associated Press was used in this report.