Neymar was sent off as Barcelona lost ground in the title race in La Liga with a 2-0 defeat at Malaga on Saturday.
Barcelona had a chance to gain on Real Madrid, who were held to a draw earlier in the day by Atletico Madrid, but instead fell three points back of the leaders, who still have a game in hand.
Sandro gave Malaga the lead in the 32nd minute when he chased down a long ball from Juan Carlos and slotted past Barca keeper Marc-Andre ter Stegen.
Neymar had earlier been booked for time-wasting, and he became the first Barcelona player to be sent off in La Liga since October 2015 after fouling Diego Llorente in the 66th minute.
Barcelona thought they had a penalty with eight minutes to play, but the referee controversially ruled that Sergi Roberto was outside the box, and substitute Jony sealed Malaga’s win with a stoppage-time goal on a counter-attack.
Real Madrid‘s La Liga title hopes were dented after they were held to a 1-1 derby draw by Atletico Madrid at the Santiago Bernabeu.
Pepe’s second-half header had looked like ensuring Zinedine Zidane’s side would remain top of the table, whatever the result when Barcelona face Malaga later on Saturday, but Antoine Griezmann’s equaliser meant the European champions’ lead only extended to three points ahead of Barca’s match.