Just when Barcelona was at its worst, Lionel Messi gave one of his best performances of the season.
Messi scored his 50th hat trick for club and country on Saturday in a 4-2 victory at Sevilla, helping Barcelona to take a big step toward retaining the Spanish league title.
Sevilla went ahead twice, but Messi hit back each time before he netted a third goal with five minutes remaining.
After taking his league-leading tally to 25 goals, Messi added an assist for Luis Suarez to round off the win before the whistle.
It was Messi's 44th hat trick for Barcelona, to go with another six for Argentina, according to the club.
"This doesn't mean the league is ours yet. There is a long way to go, but it was very important to win here to protect the advantage we have over our rivals," Messi said.
"The game turned against us but we knew how to pull it out."
Barcelona had drawn four of its previous five matches and its only goal in three games had been a penalty by Messi. A setback in Seville would have given Atletico Madrid and Real Madrid the chance to spark up the title race when they play on Sunday.
Instead, Messi almost singlehandedly ensured Barcelona opened a 10-point gap over Atletico and a 12-point advantage over Madrid.
Barcelona also rediscovered its scoring form in time for a critical week of back-to-back clashes with Madrid.
The fierce rivals meet in the second leg of their Copa del Rey semifinal on Wednesday after a 1-1 draw at Camp Nou, before clashing again in the league next weekend.
"We went through a patch when we weren't playing our best and that makes everything more difficult. We were having trouble converting our chances," Messi said.
"When everything flows, things go well for us, as we saw today. Today we were back to playing like we know how. We played a great match."
Sevilla outplayed Barcelona through much of the first half and was twice ahead thanks to Jesus Navas and Gabriel Mercado.
But Messi responded both times with strikes that produced the same result: goalkeeper Tomas Vaclik helplessly pawing thin air as the ball sailed over his head.
Messi cancelled out Navas' 22nd-minute opener four minutes later with an exquisite volley, as the Argentine blasted Ivan Rakitic's cross into the top corner of the net.
Messi equalised a second time in the 67th after Rakitic recovered the ball, laid off for Ousmane Dembele, who found Barcelona's all-time top scorer alone on the edge of the area and he curled the ball into the corner.
Messi finally put Barcelona in charge when he nonchalantly chipped the ball over Vaclik.
"Not only did Messi score three great goals, it was how he scored them," said Barcelona coach Ernesto Valverde.
"There was a lot at stake in this match. We weren't playing well and then he appeared. That is Messi."
Sevilla fell into fifth place, with Getafe moving up into the Champions League spots after beating Rayo Vallecano 2-1.
Defender Samuel Umtiti played his first match for Barcelona after being sidelined since late November with a left knee problem that has plagued him since helping France win the 2018 World Cup.
Umtiti, who played the full 90 minutes, has only made nine appearances for Barcelona this campaign.
In other results, sixth-place Alaves drew 0-0 with relegation-threatened Celta Vigo, while Athletic Bilbao won 1-0 against Eibar. Raul Garcia scored a first-minute goal for Athletic, which is up to eighth.