Cristiano Ronaldo hit a late winner to hand 10-man Real Madrid a shock 2-1 win in a fiery El Clasico and end Barcelona's long unbeaten run.
The Portuguese star pounced five minutes from the end of a pulsating La Liga clash at the Nou Camp, just moments after his captain Sergio Ramos had been sent off for the 20th time in his career.
Real had already come from behind with Karim Benzema scoring a superb equaliser to cancel out a Gerard Pique header early in the second half.
The defeat, on what was an emotional occasion for Barca in their first outing since the death of Johan Cruyff, was the Catalan side's first in 40 matches in all competitions.
It also provided a potential twist in the Primera Division title race, with Barca's lead over Atletico Madrid at the top now cut to six points and with Real just another point further behind.
It was Real's first win at the Nou Camp for three years and came in Zinedine Zidane's first Clasico in charge of the team.
The visitors handled the emotionally-charged atmosphere well and controlled large spells of the game. The contest may have been billed as a clash of two highly exciting front threes but it was in midfield where the battle was mostly fought and for a long time Real had the edge.
But the Barca threat was not completely snuffed out and it was still the hosts who created the more clear-cut early chances.
Luis Suarez spurned a great opportunity when he mis-kicked in front of goal in the ninth minute after Neymar had seized on a loose ball. Ramos claimed he had been fouled by Suarez in the build-up and was booked for his protests - something he would later regret.
Ivan Rakitic forced Keylor Navas into a low save, Lionel Messi sent a free-kick over, Andres Iniesta had a shot blocked and Dani Alves missed the target. Messi wanted a penalty after appearing to be tripped by Ramos, who was risking a second yellow card, but nothing was given and replays suggested any offence occurred outside the box.
At the other end Ronaldo tested Claudio Bravo and then missed the target from a free-kick. Benzema had a glorious chance on the stroke of half-time after being teed up by Daniel Carvajal but fired well over.
Ramos had another possible escape early in the second half after appearing to catch Alves in the face with his arm, although the Brazilian's theatrical reaction did him no favours.
Messi had a delicate chip tipped away by Navas but that led to a succession of corners from which Barca grabbed the lead with a thumping header from Pique in the 56th minute.
Real responded swiftly and were level just six minutes later as Benzema leapt and twisted to acrobatically fire home after a shot by Toni Kroos was blocked.
The visitors began to sense their opportunity and upped the tempo, although they still had a let-off when Suarez flashed a volley wide from a tight angle.
Bale thought he had headed Real in front from a pinpoint Ronaldo cross to the far post but was harshly penalised for a foul on Jordi Alba.
Real might have opted to sit back after Ramos' luck finally ran out when he incurred his second booking for a late lunge on Suarez but they pressed on.
Reward came five minutes from time when Bale chipped deep into the area and Ronaldo calmly chested down and lashed in a winner.