Barcelona twice came from behind to beat Real Betis 3-2 on Sunday with Lionel Messi setting up all three goals at the Benito Villamarin.
Frenkie de Jong, Sergio Busquets and Clement Lenglet were the unlikely goalscorers as Barca moved back to within three points La Liga leaders Real Madrid.
Sergio Canales and Nabil Fekir had twice given Betis the lead earlier in a game which saw both sides end with 10 men. Fekir and Lenglet were both dismissed for picking up two bookings.
The win will come as a huge relief for Quique Setien, who had seen his side lose their last two away games, against Valencia in La Liga and Athletic Bilbao in the Copa del Rey.
Barca now have back-to-back home games in the league, against Getafe and then Eibar, as they look to keep the pressure on Real Madrid.
Setien made changes on his return to Betis, who he coached for two seasons until last summer. Jordi Alba, Ivan Rakitic and Ansu Fati all dropped out, while Gerard Pique was suspended. Junior Firpo, Arturo Vidal, Antoine Griezmann and Samuel Umtiti came in.
There were four goals in a mad first half. Betis took the lead from the penalty spot when the VAR determined that Lenglet had handled Fekir's shot. Canales scored from 12 yards.
That was in the sixth minute and Barça levelled three minutes later. De Jong drove forward, passed to Messi and kept his run going into the box, where Messi picked him out. The Dutchman controlled and finish.
Joel then made the first of three saves from Messi before Arturo Vidal lost the ball in the middle to set up Betis' second. Barça loanee Carles Aleña def Fekir and the Frenchman drilled home when given too much space.
Betis looked set to go into the break ahead before a late twist. They failed to deal with a Messi free-kick and Busquets smashed in the loose ball.
Barca had more control in the second half and the better chances. Messi was twice more denied by Joel and then saw a chipped effort, similar to the goal he scored here last year, bounce just wide.
Messi then turned creator again, though, to drop a free-kick into the box which Lenglet magnificently headed home.
Fekir then saw red for picking up two bookings in a minute before Lenglet was dismissed for his second booking of the night, a late challenge on Joaquin.
Betis pushed for a leveller and the space meant Barca had chances to score a fourth, too, but there were no more goals and Setien saw his side hang on to a precious three points on his return to Seville.