Neymar is at risk of missing out on the clásico at the Bernabéu after sarcastically applauding the fourth official following his red card in Barcelona’s defeat at Málaga.

The Brazilian playmaker was sent off after his second booking in Saturday night’s defeat, a dismissal that is usually punished by only a one-game suspension. However, the referee, Jesús Gil Manzano, included Neymar’s reaction in his post-match report.

This could result in up to three matches being added to Neymar’s suspension, and will worry Barça given that in February, Luis Suárez was given a two-game ban after the same referee wrote in his report after a Copa del Rey game against Atlético Madrid that the Uruguayan delayed his exit down the tunnel after being sent off. Real meet Barcelona on 23 April.

Neymar’s sending-off compounded a dismal evening for Barcelona, who failed to overtake the La Liga leaders, Real Madrid and take advantage of their rivals dropping points earlier in the day. Antoine Griezmann had scored a late equaliser as Atlético Madrid secured a 1-1 draw away at their city rivals, which gave Barcelona the chance to leapfrog them at the top of the table.

The Málaga manager, José Miguel González, had not read the script and his side chalked up a second successive victory to move closer to safety.

Atlético Madrid’s Antoine Griezmann leaves it late to slow Real title charge Read more

Sandro scored on the break against his former club after half an hour and the substitute Jony Rodríguez added a late second after Neymar had picked up a needless second yellow card.

Real Madrid remain three points clear of second-placed Barcelona with a game in hand, while Málaga are now 14th.

Barcelona had made four changes, André Gomes and Jordi Alba among those drafted in. Gerard Piqué and Ivan Rakitic were suspended and Andrés Iniesta was named on the bench.

Málaga were content to sit deep and allow the visitors plenty of possession but Barcelona opened the hosts up after 16 minutes, when Alba sent Luis Suárez racing clear into the penalty area but Carlos Kameni was out quickly from his goal to make a vital block.

The Málaga goalkeeper had to be alert shortly afterwards to smother a cross from the Uruguayan as Neymar looked to pounce, before Lionel Messi curled a free-kick over.

At the other end, the Barca keeper, Marc-André ter Stegen, failed to deal with a backpass and the ball dropped to José Recio but the midfielder’s long-range shot at an empty net failed to hit the target.

Málaga swept into the lead in the 32nd minute when the defender Juan Carlos knocked a long ball forwards to Sandro, who ran from his own half to spring a high Barcelona offside trap, Jérémy Mathieu playing him on. The striker, who started his career at the Camp Nou, held his nerve as he sprinted into the penalty area before slamming the ball past Ter Stegen at his near post.

The Barcelona manager, Luis Enrique, had seen enough and made changes for the start of the second half, Iniesta and Sergi Roberto sent on to replace Mathieu and Denis Suárez.

Bayern Munich outclass Borussia Dortmund in thumping win Read more

Yet it was Málaga who should have further extended their lead as the hour mark approached. The hosts broke down the left through Sandro, who cut the ball back across the face of goal to Juanpi, but the midfielder could only tap a tame effort straight into the arms of Ter Stegen.

Barcelona went close to an equaliser when Neymar turned to drill the ball against the outside of a post from a tight angle. The Brazilian then sent a header over from Suárez’s cross but then paid the price for a rush of blood, collecting an unnecessary second caution for barging into Diego Llorente with 25 minutes still to play.

Málaga looked as though they had made their extra man count when the substitute Adalberto Peñaranda knocked the ball in with a neat finish, but the Watford loanee’s celebrations were quickly curtailed by an offside flag. It looked a marginal call.

Juan Carlos was tripped by Javier Mascherano, with contact appearing to have taken place right on the 18-yard line, but Sandro fired the free-kick into the wall.

There was a similar incident at the other end when Sergi Roberto looked to have been caught by Luis Hernández just inside the box. The referee opted to give a free-kick just outside, which Messi failed to get around the defenders.

With the clock ticking down, Barcelona continued to pour forward but were caught on the counter. The substitute Charles Dias sent Pablo Fornals away down the right and he held the ball up before cutting it back to Jony to slam into the net.