Lionel Messi played an important role off the bench with an assist for Luis Suarez before scoring himself as Barcelona secured a 3-1 win over Leganes at Camp Nou.
Ernesto Valverde's decision to rest Messi almost backfired after Martin Braithwaite cancelled out a goal from Ousmane Dembele, who was later forced off injured, but the Argentinian came off the bench to inspire Suarez's goal and then rounded out proceedings.
Dembele was almost unplayable right from the start and it came as no surprise to see him find the breakthrough with a tidy finish just after the half-hour mark.
The France international was unfortunately replaced due to a suspected hamstring problem shortly after Braithwaite made the scores level, but Suarez put Barca back in front in the 71st minute after Messi's shot had been saved, and their main man made sure the five-point gap to second-place Atletico Madrid was restored .
The lively Dembele was crucial when Barca's dominance finally resulted in a chance in the 31st minute, the forward feeding Suarez, who prodded into the side-netting from an acute angle.
But Leganes were not so lucky just over 60 seconds later.
Gerard Pique found Dembele after a charging run up the right flank and the winger darted inside, offloaded to Jordi Alba, before then steering the Spaniard's cut-back in off the right-hand post from 12 yards.
Despite Barca's control, Leganes levelled out of nowhere in the 57th minute – Braithwaite slamming home from close range after an excellent run and cross from the right by Youssef En-Nesyri, adding to his goal against Real Madrid on Wednesday.
Messi was introduced shortly after and, although they lost Dembele to an innocuous-looking injury, Barca powered to victory.
Their talisman's long-range strike was saved by Ivan Cuellar, but Suarez bundled in – catching the goalkeeper in the process – to secure the points, despite a lengthy VAR delay.
Messi then completed the scoring in the second minute of stoppage time, emphatically firing home with his right foot from the centre of the box after receiving Alba's pass.
What does it mean? Luck not on Dembele's side
It is fair to say things have not always gone to plan for Dembele so far at Barca. Injuries, reservations about his attitude and questionable timekeeping, mean he has attracted headlines. But his goal on Sunday was his 13th of the season, making it his most productive campaign as a professional, only to then suffer another injury.
Ous the man?
Dembele looked really up for this contest right from the off, completing mazy runs that otherwise looked impossible to pull off. His final pass was a little wayward early on, but he got the fans off their seats and scored a deserved goal with a fine finish.
Coutinho fails to grasp his opportunity
Philippe Coutinho is having a difficult season. Handed only his third start in LaLiga since early November, he saw plenty of the ball but did not make much of an impact in the final third.
Barca face a trip to Sevilla in the Copa del Rey on Wednesday, before returning to LaLiga action in a Catalan derby at Girona four days later. Leganes host Eibar in the league on Saturday.