Barcelona needed an own goal by Jorge Saenz to edge Leganes 1-0 and move seven points clear of Real Madrid at the top of La Liga on Saturday.
Second-placed champions Madrid face Alaves on Sunday and have to play catch-up after Hansi Flick’s side held on for their narrow and important win on the road.
The Catalan giants are still fighting for a potential quadruple this season and took another stride towards the league title at Butarque stadium.
Barcelona lost 1-0 at home against Leganes in December during a slump which they have turned around in 2025, now 24 consecutive matches unbeaten since the turn of the year.
The Madrid based side set up to frustrate as they did in the first meeting, slowing the game with tactical fouls and the occasional time-wasting.
A Raphinpa cross, targeted at Robert Lewandowski enabled Saenz to intercept and turn the ball into the back of the net.