Atletico Madrid ensured they would stay top of the Primera Division for another week with a 1-0 win over Villarreal at the Vicente Calderon, but Los Rojiblancos were made to sweat for the three points.
Captain for the day Raul Garcia headed in the only goal of the game after 14 minutes, but the hosts created few further opportunities and spent the latter stages holding on amid Villarreal pressure and survived a scare in the final minute when Toby Alderweireld diverted a cross just inches wide of a post.
Barcelona produced an unconvincing display against Real Betis but still beat the Primera Division bottom side 3-1 to keep up the pressure on Atletico.
Lionel Messi opened the scoring from the penalty spot after 15 minutes and Jordi Figueras, who had conceded the spot-kick, doubled Barca's lead with an own goal midway through the second half.
Betis striker Ruben Castro quickly pulled one back for the visitors but Messi struck again in the 85th minute, reacting quickly to having a penalty saved to send the ball in on the rebound and seal the three points.
Gareth Bale took advantage of a goalkeeping howler to help Real Madrid claim a deceptively-difficult 4-0 victory at Real Sociedad.
With Atletico and Barca having already won, Madrid knew anything other than victory at the Anoeta could spell the end of their title challenge, but they came away with the three points thanks to goals from Asier Illarramendi, Bale, Pepe and Alvaro Morata.
Rayo Vallecano cruised to a key 3-0 win over Celta Vigo to ease their relegation worries.
Ruben Rochina scored the opener in the 26th minute and a quick double from Alberto Bueno in the second half ensured Rayo were not even rocked by Razvan Rat's 64th-minute red card.
Rayo began the weekend just three points above the drop zone but end it firmly in mid-table and above Celta on their head-to-head record.