Captain Sergi Roberto scored twice as Barcelona held off bottom club Almeria to claim three valuable points in the La Liga title race.
The result lifts Barca to third in the table, six points behind leaders Girona and four adrift of second-placed Real Madrid, who both have a game in hand.
Goals from Raphinha and Roberto twice put the hosts ahead, only for Leo Baptistao and Edgar Gonzalez to level.
However, Roberto's late effort ended their three-game winless run.
Xavi's side now travel to Dallas for a friendly against Mexican side Club America before they head into their winter break, with their next fixture at Las Palmas on 4 January.
In truth they perhaps could and should have won by more against a plucky Almeria side who rode their luck and benefited greatly from some indecision and poor play in the Barcelona defence.
Leo Baptistao was played onside by Ronald Araujo to equalise after Raphinha had smashed in from close range to give the hosts a first-half lead.
And Roberto's header on the hour mark was cancelled out after a mistake from stand-in goalkeeper Inaki Pena allowed Gonzalez to tap in.
Barca forward Robert Lewandowski, who has now scored three goals in 14 matches in all competitions, also had several good opportunities to score.
As Barca chased victory Ilkay Gundogan headed wide from two yards before Roberto came to the rescue, placing his effort beyond visiting goalkeeper Luis Maximiano from the Poland forward's fine pass.
Source: BBC
BDST: 1352 HRS, DEC 21, 2023
SMS