(CNN) -- A superb second half goal from substitute Zlatan Ibrahimovic gave Barcelona a 1-0 win over arch-rivals Real Madrid to go back to the top of the Spanish La Liga on Sunday.
Both teams ended with 10 men after Barca's Sergio Busquets went just after the hour mark for a second yellow card, with Real losing Lassana Diarra in the dying moments for two yellows.
Ibrahimovic's goal was truly worthy of settling 'El Clasico' as the Swedish striker met a Daniel Alves ball from the right on the volley to leave Iker Casillas with no chance.
The 55th minute strike in the Camp Nou came shortly after he replaced the ineffective Thierry Henry and followed an opening half in which visitors Real were the more threatening.
Real had gone into the game with a one point lead in the standings over the defending Spanish and European champions and showed their quality on the break.
Cristiano Ronaldo, making his first start in two months, might have put the visitors ahead in the 20th minute but was denied by home keeper Victor Valdes, who knocked his shot wide with his legs.
Barcelona central defender Carlos Puyol also came to their rescue with two last-ditch challenges on Marcelo and Gonzalo Higuain from similar Real attacks.
But the Catalans made the breakthrough as Ibrahimovic went some of the way to justifying his massive transfer fee and soon afterwards midfielder Xavi came within a whisker of a second from long-range.
Further chances fell to Eric Abidal, who shot wide, and Argentine ace Lionel Messi, who was superbly denied by Casillas from close range.
A tiring Ronaldo was substituted and his replacement, Karim Benzema, fired over the top in the 80th minute as Real pressed in vain for an equalizer.
"This was a very good test," Barca coach Pep Guardiola told gathered reporters.
"It's always difficult against Madrid but even more so when you go in as favorite and them as a big underdog. That's when Madrid is most dangerous."
The three points leave Barcelona on top with 30 points from 12 games, two ahead of Real on 28. Sevilla, who drew on Saturday, have 26.
In other action on Sunday, Deportivo La Coruna had a hard-fought 1-0 win at Racing Santander to move level on points with fourth-placed Valencia.
Albert Lopo struck in the 76th minute to give the Galicians their eighth league success in 12 matches.