The goals came fizzing down in a strange, penalty-strewn affair at Bernabeu stadium last night between Real Madrid and visitors Barcelona.

The matched ended 4-3, drawing to a close a 31-game unbeaten run by Real Madrid that stretched back to October when the sides met at Camp Nou in the reverse fixture.

An hour before the game kicked off, on the tree-lined side street outside where Real Madrid's hooligan brigade - the Ultras Sur - meet to do their pre-match war dances, the famous Chelsea chant "Jose Mour-INHO, Jose Mour-INHO, Jooooose Mourinho" got an airing.

They miss him when it comes to clasicos. The Portuguese lost only one of his last seven Spanish derbies. The record of his successor, Carlo Ancelotti, who took over in the summer, now reads 0-2.

Lionel Messi, who later surpassed a half-century record held by fellow Argentinean great Alfredo di Stefano for the most goals scored in Barcelona-Madrid derbies, got the biggest jeer when the teams were announced. The records keep tumbling for him. Messi has now scored 21 clasico goals, three more than Di Stefano and eight more than Cristiano Ronaldo.

The stadium fell church-quiet in the sixth minute, save for the 200-odd travelling support, perched in the eaves of the stadium's north end, when Andres Iniesta's goal flew in to put Barcelona in the lead.

An insipid shot by Neymar, when put clear by Messi, set the tone for his night. The samba has been knocked out of the Brazilian since landing in Spain last summer.

After a bright start to his Camp Nou career, Neymar, who has only scored one goal in 2014, has been in the doldrums since some murky business involving his transfer fee came to light in January, forcing Barcelona's president Sandro Rosell to resign because of his "negotiating engineering".

Neymar's runs were largely aimless, his passing profligate, and his light frame easily hustled off the ball by Real Madrid's guards at the gate, Sergio Ramos and Pepe.

Pepe is not your average hard man. He mixes overly physical defending, excelling in clamouring on top of opponents, all arms, elbows and spittle, with a penchant for simulating injury.

After Messi scored his side's second goal shortly before half-time, drawing the sides level at 2-2, Pepe half-nutted a celebrating Cesc Fàbregas out of frustration. To try to cover his tracks, he fell theatrically to the ground clutching his head. The ruse worked; the Portuguese managed to avoid a red card.

Angel Di Maria and Karim Benzema had caused all sorts of turmoil for Barcelona's defence in the first half. Benzema, who is playing with rare self-confidence, has scored more goals than in any of his previous four seasons at the club, and lorded it, especially in the air, striking twice in the first half.

Gareth Bale, the €100m man, was full of effort and earnestness, but lacked effectiveness. His occasional runs never seemed to end anywhere meaningful. On Madrid's other flank, Balon d'Or winner Ronaldo provided his adoring public with his side's third goal, with a penalty awarded when he was tripped by Dani Alves, though the contact seemed outside the box. Fans danced around the stadium draped in blue-and-white scarves.

Neymar was taken off, withdrawn for Pedro. He had one significant parting shot, however, earning the visitors a penalty, and a red card for Ramos, which drew the teams level at 3-3 as the tie entered its final quarter.

The stadium became engulfed in whistles for the final stretches of the game as Madrid's disgruntled supporters despaired of their team's lack of possession. Barcelona, who have taken control of the football to extreme levels with their tiki-taka model, are the last team anyone would ever like to face a man short.

The whistles from the supporters turned to shrieking when their side fell 4-3 behind in the 84th minute, courtesy of a second penalty from the supposedly out-of-form Messi, who ended the night with a hat trick.

The win for Barcelona was unexpected. They had ceded 10 points to Madrid in the league in 2014. They now trail their rivals by just one. Madrid, though, will get a shot at revenge very soon. The two sides meet in the final of the Copa del Rey, Spain's cup competition, in a little over three weeks' time at the Mestalla stadium in Valencia.

With nine games left in the league, the real winner on the night was Atletico Madrid, however, who now sit perched on top by virtue of a better head-to-head record over their capital rivals.

"The referee made a lot of errors," complained Ronaldo. "There needed to be a referee to match the importance of the game. He was pale and nervous. It is a difficult fight.

"There have been people who don't want us to win and that Barca stay strong. The treatment is not equal. People want Barcelona to stay in the fight and so they have."