Lionel Messi scored a last-minute penalty as Barcelona defeated Espanyol, 2-1, on Saturday in an incident-filled derby match that contained crowd trouble, two controversial goals and a sending off.
Under-fire striker Thierry Henry equalised late on for Barcelona before Messi converted a penalty with virtually the last kick of the game to keep Barca three points behind leaders Villarreal.
With ten-men Espanyol leading, 1-0, referee Luis Medina temporarily stopped the match in the 69th minute after fans threw flares at the celebrating Espanyol fans.
The players were called off but play then resumed seven minutes later and Henry equalised four minutes after the restart.
Espanyol had taken the lead under controversial circumstances on 19 minutes with Ferran Coro firing home after Luis Garcia appeared to foul Barca's goalkeeper Victor Valdes, causing him to drop the ball.
With Espanyol down to ten after Nene was sent off for a stray elbow, Messi struck the winner in the final derby match at Espanyol's Montjuic stadium.
Barcelona is third, three points behind new league leaders Villarreal and go into Wednesday's Champions League match at Shakhtar Donetsk in high spirits.
Villarreal lead the standings after a hard-earned 1-0 win over Sporting Gijon as they collected 13 points from a possible 15.
Valencia can reclaim top spot with victory over Deportivo La Coruna on Sunday.