Andres Iniesta and Carles Puyol scored to help Barcelona to a 2-1 comeback victory at home to Valencia on Saturday, but it was Real Madrid who moved to the top of La Liga with a 4-1 win in Malaga.
Valencia started the day as the unbeaten league leaders in Spain and Pablo Hernandez's strike before the break had their hosts on the rack.
The champions rose to the challenge in the second half, however, and fit-again Spain midfielder Xavi set up both goals to put them second with 16 points from seven games, ahead of Valencia on goal difference.
Earlier, Atletico Madrid overcame local rivals Getafe 2-0 with goals from Simao, whose freekick went in after hitting the post and then the keeper, and Diego Costa.
XAVI BACK
Barca playmaker Xavi recovered from the sore tendons that kept him out of Spain's recent Euro 2012 qualifiers to start, but was given little space in which to work in the first half at the Nou Camp.
Valencia were dangerous on the counter and it was from a quick break in the 38th minute that Jeremy Mathieu pulled the ball back for Pablo to score.
Three minutes later, Barcelona goalkeeper Victor Valdes saved one-handed from Pablo after another rapid move on the counter and that miss proved costly.
Barca were much sharper after the interval and a wonderful one-two between Iniesta and Xavi sliced Valencia open down the middle for the scorer of Spain's winner in the World Cup final to net in the 47th.
"Equalising at the start of the second half was crucial. The win gives us confidnce for the coming games, especially the changes we made after the break," Iniesta told Spanish television.
"In the first half we didn't control the ball and this was the key."
Cesar saved magnificently from striker David Villa soon after, but was helpless in the 63rd when central defender Puyol drilled a powerful header past him from a Xavi cross.
It was a frustrating night for Spain forward Villa against his former club and he was denied by Cesar again despite being put clean through in a one-on-one near the end.
RONALDO CROSS
Real Madrid had struggled for goals in the opening games of the season but after thumping Deportivo Coruna 6-1 last time out they seem to have found their range.
Portugal's Ronaldo had a hand in all four goals and crossed for Argentina's Higuain to volley home the opener in the 30th minute, after the side had already hit the woodwork twice.
Malaga were combative and caused the visitors problems on the break, but Mesut Ozil broke down the right and crossed low for Ronaldo to double the lead just before the break.
Ronaldo scored from the penalty spot in the 47th and although Kris Stadsgaard pulled one back at a corner for Malaga, Real made it four when Ronaldo surged down the centre of the pitch and laid off for Higuain to bag the fourth in the 65th.
The world's most expensive player felt he had finally found his form after enduring a frustrating start to the season during which he was booed and whistled by home and away fans.
While media reported that Ronaldo had been anxious to end his lean spell, the 25-year-old said: "I never said I was suffering from anxiety, this is just the media talking.
"I focus on working for things that are good for the team and knew that the goals would arrive sooner or later."
Barca's Xavi to miss Stuttgart game with injury
Cristiano Ronaldo names son after himself
Time for Spain to gain top spot says Xavi
Ronaldo strips off to advertise a watch
Villla keen on having Fabregas at Barca