Barcelona came from behind to snatch a 2-1 victory at La Liga's basement club Leganes on Saturday after another unconvincing away display away by the champions as substitute Arturo Vidal struck a scrappy late winner.
Struggling Leganes had taken the lead in coach Javier Aguirre's first home game in charge thanks to a superb strike into the top corner from Morocco forward Youssef En-Nesyri in the 12th minute.
The home side spurned chances to extend their advantage but Barca levelled in the 52nd minute when Luis Suarez glanced in Lionel Messi's free kick.
Barca won the game thanks to a fortunate goal in the 79th minute from Chilean midfielder Vidal, who was in a clear offside position when he knocked in from close range but a VAR review ruled him on as the ball had bounced off Leganes' Ruben Perez.
Vidal admitted Barca need to raise their performances.
"It's always nice to score for Barcelona and it's even better when it means getting the three points and leaving a difficult ground getting the result we wanted," he said.
"The sensations are not good when you concede first and we have to improve a lot. We need to try and control these games better and not concede early as these are the matches that decide titles."
Ernesto Valverde's side extended their lead at the top by three points, although second-placed Real Madrid can go level with them when they host Real Sociedad later on Saturday.
Barca travel to title rivals Atletico Madrid next and will be without influential midfielder Sergio Busquets who is suspended after picking up a fifth yellow card of the campaign.
The Catalans had won only two of six away league games this season and were forced to hand 21-year-old defender Moussa Wague a first start of the campaign as Nelson Semedo, Jordi Alba and Clement Lenglet were injured and Sergi Roberto was suspended.
Valverde opted to field four forwards from the start as Ousmane Dembele and Antoine Griezmann joined Suarez and Messi in attack but they looked lightweight in midfield and created few chances before the break.
The coach made a double change as Vidal and Ivan Rakitic replaced Griezmann and Busquets and he also sent on teenage forward Ansu Fati for Frenkie de Jong.
"The coach wanted to start with four forwards and it did not go well for us in the first half," Vidal said.
"In the second half, playing with our usual system, we played better."