However, Barca keeper Marc-Andre ter Stegen was adjudged to have felled Rafa Mir on the stroke of halftime as the forward attacked a cross. He picked himself up to net the penalty and halve the deficit against the run of play.
A first goal for the club by defender Oscar Mingueza restored Barca’s two-goal cushion eight minutes after the restart as he nodded in a Messi corner. Mir then missed a golden chance to pull one back when he contrived to head over from close range moments later, and was made to pay as Messi rounded off the win in the final minute of normal time with a deflected effort.
“I’ve always said there’s all to play for in the league title race,” Barca coach Ronaldo Koeman said.
“We’ve bounced back well after dropping points early on in the season. The side are looking good and we are confident we can fight for the trophy. It’s a great result to build on. We were good in the first-half and we kept our intensity up in the second, too.
“We can’t afford to drop any more points because we’ve already dropped quite a lot.”
The victory lifted Barca to 59 points in second place, four behind table-toppers Atletico Madrid. Huesca, meanwhile, remain bottom of the table on 20 points, four from safety.
Messi equalled Xavi Hernandez’s all-time appearance record for Barcelona.
Koeman hails Messi as all-time most important player
Barcelona coach Ronald Koeman lauded Messi as the most important player in the club’s history as the Argentine celebrated making a record-equalling 767th appearance for the Catalans. “What more can you say (about Messi)?” a beaming Koeman told reporters.
“His level over so many years, over so many games… he’s the most important player in Barcelona’s history and thank goodness he’s still here with us. I think he’s shown he’s the best player in the world. The first goal he scored was fantastic, and he deserves to be the focal point of this team.”
The result moved the Catalans to within four points of top spot as they chase down pace-setters Atletico Madrid. Teenager Pedri, who was called up to the Spain national team for the first time earlier on Monday, also praised Messi – a player he has been earmarked to succeed at the Nou Camp.
“To play alongside Leo is an absolute joy. I enjoy going to training everyday,” said the 18-year-old.
“Whenever I get it, I try and pass to him because every time he touches the ball, something happens. It’s absolutely crazy what he`s achieving. He’s the best player in the world.”