Memphis Depay's controversial late penalty ensured Barcelona avoided a setback in their Champions League chase as they came from behind to beat Elche 2-1.
The Blaugrana have been in impressive form since their 3-2 loss to Athletic Bilbao in the Copa del Rey on January 20, which they avenged with a 4-0 league win last time out.
But ahead of Sunday's meeting between two of their rivals in the race for the Champions League places, Real Betis and Atletico Madrid, Barca looked poised to have to settle for a point.
Elche took the lead in the 44th minute through Fidel, but Ferran Torres ended his much-publicised wait for a league goal on the hour before Depay blasted home emphatically from 12 yards after the VAR adjudged Antonio Barragan to have handled in the area.
It took a heroic piece of defending to prevent Barca from taking the lead in the 27th minute, Diego Gonzalez doing brilliantly to clear Frenkie de Jong's shot off the line.
De Jong was later thwarted again by Edgar Badia's fine save, and his profligacy was punished on the stroke of half-time.
Pedri, in competing for the ball in midfield, inadvertently played a perfect pass to Fidel, who calmly strode into the box and found the bottom-right corner with a composed finish.
A late lifeline
However, Elche could only survive 15 second-half minutes before Torres restored parity by sliding in from close range after Jordi Alba diverted Ousmane Dembele's deep cross his way.
Marc-Andre ter Stegen prevented Pere Milla from restoring Elche's lead and Badia was similarly defiant in repelling Torres twice in quick succession.
But Barca were given a lifeline by the video officials, who deemed Barragan guilty of handball in a duel with Depay, allowing the Netherlands international to fire an unstoppable penalty into the top-right corner.
Elche's fury was only heightened when Alba somehow avoided being punished for the same offence from a corner, with unused substitute Javier Pastore seeing red for his protestations.