Barcelona 3-2 Almeria - Highlights
Barcelona ground out an unconvincing 3-2 home win against basement club Almeria on Wednesday thanks to a late Sergi Roberto goal, moving them up to third in La Liga.
Xavi Hernandez's side ended 2023 with a win thanks to Sergi Roberto's double and a first-half goal from Raphinha.
Twice the 20th-placed visitors pegged back the Catalan giants courtesy of goals from Leo Baptistao and Edgar Gonzalez but it was eventually the home team who held out to claim the spoils.
The opening 45 minutes threw up several good chances for both sides as Barcelona set about methodically trying to break down the visitors.
It was nearly an early set-piece that did the trick for the Catalans when captain Sergi Roberto was left all alone in the centre of the box but 'keeper Luis Maximiano did exceptionally well to keep out his headed effort.
The hosts then got a warning shot at the other end after Ronald Araujo missed a cross and Joao Cancelo desperately had to intervene to block Largie Ramazani's effort in the 13th minute.
Raphinha opened the scoring on 33 minutes when weak Almeria defending, again from a corner, allowed Araujo to get a header goalwards, Maximiano made another fine stop but was unable to do anything about Raphinha's lashed rebound.
Now in the lead, Xavi's charges took their foot off the pedal, yet they almost got a second when Robert Lewandowski was gifted the ball in the box by a defender and only another excellent Maximiano save denied him.
This drop in intensity did then prove to be their undoing as just eight minutes later, Leo Baptistao shocked them with an equaliser.
A defensive error by Araujo let Sergio Arribas slip the Brazilian striker through and his dinked finish over Inaki Pena quickly resulted in the assistant's flag being raised.
Initially off-side earlier in the move, VAR replays showed he had got back onside by the time Arribas played him the ball.
Xavi rang the changes at half-time and sent on Ferran Torres and Jules Kounde in place of Joao Felix and Andreas Christensen.
Torres had an instant impact, working the Portuguese stopper with a firm strike three minutes after half-time.
Despite this injection of pace, the home side still looked sluggish.
Poor set-piece defending gave Barca the chance they needed to get back in front on the hour mark, Sergi Roberto meeting a corner at the near post and lofting a header over the goalkeeper's dive into the far corner.
The second goal appeared to have knocked the stuffing out of the 20th-placed side but a gift from Pena got them back in it, when he dropped a lofted free-kick at Edgar's feet and the defender gleefully rolled the ball into the unguarded net.
Barca had a golden chance to win the game with just over 10 minutes remaining, but first Lewandowski then Ilkay Gundogan were unable to make sufficient contact with their headers when the goal was gaping before them.
But it was Sergi Roberto, in just his fifth appearance of the season, that provided the winning goal for the Spanish champions when he burst onto Lewandowski's lofted pass in the 83rd minute and slotted past Maximiano.
Five minutes later, Pena atoned for his earlier error by making a great reflex save from an Iddrisu Baba header as his side stumbled over the line in a topsy-turvy encounter.