Barcelona were held to a 0-0 draw at Osasuna in La Liga on Saturday, while Atletico Madrid lost 1-0 at Espanyol.
Barca and Atletico both saw their 100 percent starts to the Primera Division season ended on matchday nine.
The Catalan giants opted to rest several first-team regulars ahead of Tuesday's Champions League trip to AC Milan, with Lionel Messi starting on the bench after his thigh injury and Gerard Pique, Dani Alves and Alexis Sanchez not included.
The visitors bossed possession and had the lion's share of chances - the best of which were passed up by Cesc Fabregas - but Osasuna held on to become the first team in La Liga to keep a clean sheet against Barca in almost two years.
Atletico went down 1-0 at Espanyol in the late kick-off. On-loan Chelsea goalkeeper Thibaut Courtois attempted to keep out a deep cross from Juan Fuentes but the ball bounced off his arm and into the net after 54 minutes for the only goal of the game.
Cristiano Ronaldo converted a stoppage-time penalty won by Gareth Bale to seal a 2-0 victory for Real Madrid against Malaga, allowing Carlo Ancelotti's side to maintain the pressure on Barcelona and Atletico.
Los Blancos led 1-0 thanks to a fortuitous goal from Angel Di Maria just after half-time, but then spent much of the second period being frustrated by some outstanding saves from Malaga goalkeeper Willy Caballero as they sought a second goal.
However, the clincher duly arrived in added time. Ronaldo, who had had a frustrating afternoon, crashed a spot-kick into the bottom corner after 76th-minute substitute Bale had chased a long ball before going to ground under a challenge from Weligton.
Real Sociedad claimed their first Primera Division win since the opening day as they ended Valencia's five-game unbeaten run with a 2-1 success at the Mestalla.
Antoine Griezmann and Ruben Pardo scored either side of half-time to pave the way for a much-needed three points.
Dorlan Pabon grabbed a consolation goal for Valencia in injury-time.