This Clasico clash was there for the taking. Even with 10 men, Real Madrid had chances to finish off Barcelona in the title race and also to win the match. But just when it looked like they had earned a valuable draw, they were staring instead at a dramatic defeat.
A point would have been enough and although Barcelona were dangerous all evening despite the absence of the suspended Neymar, Madrid saw plenty of the play and had sufficient opportunities to come away with a positive result which would have all but sewn up La Liga.
Three points clear at the top of the table and with a game in hand over their fierce rivals, Madrid were more than happy when James Rodriguez levelled late in the game and with just two minutes of injury time added on, it appeared over.
But that was enough time for Lionel Messi to finish off a quick counter-attack in another epic display from the Argentine at the Santiago Bernabeu. And thanks to Leo, Barca are now very much back in the title race as they finish the evening in top spot.
Nevertheless, Madrid will feel they should have taken at least a point from this match and coach Zinedine Zidane will look to missed chances from Cristiano Ronaldo in particular and the dismissal of Sergio Ramos as key moments in this defeat.
Ronaldo and Ramos are Madrid's men for the big occasion, but the Portuguese squandered several opportunities including one glorious chance when he blazed over the bar with the goal at his mercy and only Marc-Andre ter Stegen to beat.
But Ramos' red left Madrid in terrible trouble. The Real captain was sent off for a reckless lunge on Messi - who was battered all evening and could have had Casemiro sent off earlier - that was deservedly punished with a dismissal.
The 31-year-old defender left the pitch shaking his head and involved in a heated exchange with Spain team-mate Gerard Pique, but he could have no complaints and unlike last season's Clasico at Camp Nou, this time Madrid were unable to get a result after his dismissal.
Again it was an impressive display by Barcelona - victors in some style at the Bernabeu in years gone by. Clearly, Madrid's home is an arena no longer feared by the Blaugrana, with the Catalans claiming wins by 6-2, 2-0, 4-3 and 4-0 in recent seasons in the Clasico clash away from home.
Zidane will be asking questions, though - and his decision to start Gareth Bale also seems a strange selection with the Welshman only just recovered from injury and both Isco and Marco Asensio in much better form.
With Bale injured again, Asensio's introduction led to an improvement from Madrid, but missed chances cost the home side and Ramos' red left them exposed in the final stages when they should have had the upper hand.
With one title win in eight seasons, Madrid are now in danger of blowing La Liga once again. If that happens, this Clasico defeat to Barca will undoubtedly have been the turning point - and it should have been avoided.