|Messi scored his 40th goal of the season to give Barca the ascendancy in the title race [AFP]
A midfield masterclass from Xavi Hernandez clinched a 2-0 win for Barcelona in El Clasico to put them three points clear in a title race that has been neck-a-neck for weeks.
Real Madrid lost for the first time in 16 home fixtures as their fierce rivals came to the Santiago Bernabeu to take all three points and ascendancy in the Spanish Primera Division.
Lionel Messi scored his 40th goal of the season with 33 minutes gone as he chested down a return ball from Xavi over the top of the defence to score beyond a lunging tackle from Raul Albiol.
And fellow 22-year-old Pedro Rodriguez escaped Alvaro Arbeloa to run onto another exquisite through ball from Xavi and curl a finish beyond Iker Casillas four minutes before the hour mark.
It gives the Spanish and European Champions 70 points to Real's 67 with seven games to go.
And the manner of their win in a week when Messi scored four to banish Arsenal from the European Champions League is further fuel for the claim that this is one of the greatest club sides ever seen.
But if Real's pretender to Messi's position as the world's greatest player, Cristiano Ronaldo, had put away a good chance seconds before Pedro's winner, the scoreline and the likely destination of the Spanish title could have been a whole lot different.
Real peppered Victor Valdes' goal with hopeful long shots but it was the craft of Xavi and Messi that carved the Madridistas open and demonstrated that the gap at the top of the table is a matter of class, not just points.
For all the millions spent on their team, Real were disjointed and lacking ideas as they frustrated home fans looking to break Barca's stellar rise in the Spanish and world game.
Xabi Alonso headed over just before half time, Ronaldo skidded his shot tamely at goal before Pedro's strike and then Rafael van der Vaart allowed Valdes to save with the goal at his mercy.
But their run of 12 league wins in a row came to an end in front of a half-empty Bernabeu as the clutch of visiting fans celebrated what will surely be the Catalans' second straight title.