Frenkie de Jong netted an 87th-minute winner as Barcelona finally found themselves on the right side of late drama in a 1-0 victory at Deportivo Alaves.
Barca entered the game on a three-match winless run in all competitions, having been held by Granada following a last-gasp equaliser before consecutive cup defeats after extra-time.
The stage was set for another frenzied finish after Luuk de Jong passed up two presentable opportunities for the Blaugrana, and it was his namesake who delivered this time.
Xavi's men leapfrogged Real Sociedad into fifth place in the LaLiga table, a point behind Atletico Madrid after their own late show a day earlier.
On a long night, Barca were on top from the outset but struggled to break down Alaves before Frenkie de Jong's intervention.
Luuk de Jong volleyed the best of their first-half openings wide, although Pere Pons should have done more than shoot tamely straight at Marc-Andre ter Stegen on the counter just before the break.
Forward Luuk de Jong had the clearest opportunity after the restart, too, but could not make a clean contact with Pedri's driven cross, allowing Fernando Pacheco to block at close quarters.
Joselu thundered a header wide when Alaves might have snatched all three points, before the winner instead arrived at the other end.
Ferran Torres stayed onside to reach Jordi Alba's deep pass and tee up Frenkie de Jong for a simple finish and a lead that was not squandered in the closing stages on this occasion, despite a 93rd-minute headed chance for Edgar Mendez.
What does it mean? Xavi struggling to strike a balance
After back-to-back 3-2 defeats, Xavi would have been delighted to keep a clean sheet away from home. For long periods, though, it looked as though the knock-on effect would be a blunt display in attack.
Barca had merely matched Alaves' expected goals performance of 0.6 prior to the decisive goal, albeit that came from the clearest opening of the entire contest.
Going forward, the Blaugrana must create more, but a clean sheet and three points represent progress for now.
One man who does not need to shoulder any of the responsibility for Barca's attacking struggles is Pedri, who created six chances – twice as many as the rest of his team-mates combined.
These key passes included a pair of balls to Luuk de Jong that really should have led to an opener long before the closing stages.
Barca are missing an entire front three with Memphis Depay and Ansu Fati injured and Ousmane Dembele out of the picture after refusing to sign a new contract, meaning Luuk de Jong has to play a prominent role. He never looked like scoring.
Torres, whose best displays for Manchester City came through the middle, might wonder if he is instead deserving of a run in that central striking role, limited to only a single attempt out wide on top of the assist he laid on.
Barca head into a two-week break on a high and have some time to prepare for a potentially season-defining meeting with Atletico at Camp Nou. Alaves, back in action a day earlier on February 5, play Elche next.