In a match full of cut and thrust from both sides at the Estadio Butarque, Luis Suarez’s double was enough to see off a brave and spirited performance from Leganes.
The game started in unusual fashion with a double-touch on the ball meaning an immediate free-kick.
Barcelona settled the quicker of the two sides and Suarez was unlucky to have an early goal ruled out for Jordi Alba’s offside assist.
The possession-based game that the Catalans are known for was very much in evidence in the opening exchanges, but Leganes were alive to every ball and sharp in the tackle.
On 19, a lack of concentration in midfield from Ivan Rakitic allowed Nordin Amrabat to nip in and travel the length of Barcelona’s half with the ball, but a poorly executed finish kept the game goalless.
Though the visitors continued having the lion’s share of play, a doggedness from the hosts ensured that Lionel Messi, in particular, was crowded out of the game.
A wild right-footed volley from a corner on 27 minutes was the closest he’d come to getting his name on the score sheet in the opening 45.
In the next attack, a fierce goal bound shot from Paco Alcacer deceived keeper Ivan Cuellar, who dropped the ball straight at the feet of Suarez.
With the whole goal to aim at, the Uruguayan made no mistake for his first goal since scoring the equaliser against Atletico Madrid.
Just a minute later, Gerard Pique was handed a yellow card after manhandling Amrabat, meaning the centre-back is now out of the top-of-the-table clash against Valencia in week 13.
A great save by Marc-Andre ter Stegen from Alexander Szymanowski’s goal-bound shot kept the status quo as the teams headed into the break, and it was the Argentinian who was involved again on 44 with a whipped cross that Eraso only just failed to connect with.
Asier Garitano urged his team forward at the beginning of the second half and ter Stegen would come up trumps again when Claudio Beauvue was clean through.
At the opposite end, Cuellar disgraced himself on 53 after collecting the ball from a Barcelona attack.
Handing off Suarez, he feigned injury and suggested he’d been hit in the face by the striker, an action that saw the goal scorer yellow carded.
Still Leganes poured forward in search of an equaliser.
A double change just before the hour saw Andres Iniesta and Nelson Seemed depart for Barcelona, Paulinho and Aleix VIdal taking their places.
No sooner had they settled in than the visitors went straight up the other end to score a second, Suarez on the mark again, thanks to a wicked deflection to deceive Cuellar.
Messi and Alcacer were involved in the build-up to a goal that was to prove decisive, but Ter Stegen has to take credit for the win too, after yet another point-blank stop, from Amrabat in the 63rd minute.
With some breathing space between them, Barcelona calmed the game down and left Leganes chasing shadows for long periods.
A super, incisive move from the visitors deserved better than Vidal’s wild effort with the goal at his mercy, but, fortunately for him, there were no repercussions.
The final period of the match drifted somewhat, with Barcelona content to soak up the pressure and try and hit their hosts on the break.
Paulinho capped off a fine victory for the away side with the third after Messi’s tenacity carved out the chance.
It’s a vital win for the Blaugrana that will keep them top no matter what the result at the Estadio Mestalla in the next league fixture.