Lionel Messi’s 90th-minute penalty kick on Sunday saw off the challenge of gutsy Leganes and spared FC Barcelona from a second successive embarrassing result.
The champions under performed again after Tuesday’s 4-0 UEFA Champions League defeat at Paris St-Germain and had goalkeeper Marc-Andre ter Stegen to thank for a string of great saves.
Messi gave Barca an early lead, scoring after three minutes, before Unai Lopez fired in the equaliser in the 71st minute.
The FC Barcelona forward then slammed in the late winner from the penalty spot. Victory saw the Catalan giants move two points above Sevilla into second place in La Liga.
They have 51 points, one fewer than leaders Real Madrid who have two games in hand.