Barcelona were made to work incredibly hard by Villarreal on Saturday night, eventually securing a scrappy 3-1 victory which was not as comfortable as that scoreline may suggest.
The score could have easily been 3-1 in Barcelona's favour after just ten minutes. Ez Abde's header was saved well, Arnaut Danjuma's strike was blocked by Gerard Pique, and Memphis Depay and Gavi both missed great chances within 30 seconds of each other.
Memphis they wasted an even better chance midway through the half, slicing wide when one-on-one with Geronimo Rulli, after which Villarreal began to grow into the game.
Pau Torres rose highest from a corner and easily should have scored, but Barcelona's defenders nowhere to be seen and Marc-Andre ter Stegen flinging himself to the floor in desperation.
Danjuma and Alfonso Pedraza both spurned excellent chances themselves, and somehow, the first half finished goalless.
Just two minutes into the second half, Barcelona were in the lead. Frenkie de Jong tapped home from close range, and his effort was allowed to stand after a lengthy VAR check.
We then got a repeat of the first half, only without the goal action. Both sides enjoyed plenty of possession and had plenty of goes at finding a route to goal, and it was Villarreal who bagged the next goal.
With 15 minutes to go, substitute Samu Chukwueze found himself through on goal and his snapshot was too fierce for Marc-Andre ter Stegen to keep out.
Villarreal dominated the final stages and could have had two or three, but a route-one ball up to Memphis provided the winner for Barcelona. The Dutchman capitalised on some poor defending to round the Villarreal goalkeeper and flex his composure by tapping into the back of the net to save the day.
Substitute Philippe Coutinho bagged a third from the penalty spot in injury time, sealing a hectic victory for Xavi's side.
Barcelona player ratings vs Villarreal
1. Goalkeeper & defenders
Marc-Andre ter Stegen (GK) - 6/10 - Some very shaky moments but some excellent saves as well. A real mixed bag.
Eric Garcia (RB) - 3/10 - Looked really awkward at right-back but was not helped by Xavi's weird change of system, which saw him ordered to man-mark Moi Gomez all over the field. It really didn't work, but that's not totally his fault.
Ronald Araujo (CB) - 8/10 - Barcelona's best player these days and it's not even close.
Gerard Pique (CB) - 5/10 - A nice block to deny Danjuma early on. Hit his arm but was clearly accidental.
Jordi Alba (LB) - 5/10 - Had a really tough time dealing with Yeremy Pino. Lacking a yard of pace before limping off with 20 minutes to go.
Sergio Busquets (DM) - 7/10 - Caught by a really nasty challenge from Dani Parejo after just a few seconds, but shook that off to help Barcelona control the midfield battle.
Nico Gonzalez (CM) - 5/10 - A tricky performance from the youngster. Didn't defend well enough and not all of his passes were impressive.
Frenkie de Jong (CM) - 8/10 - Looked to be really enjoying himself. Played a gorgeous pass for Memphis and was absolutely robbed of an assist. Got the goal his performance deserved.
Ez Abde (RW) - 6/10 - Was Barcelona's brightest forward before Xavi decided to turn him into a secondary right-back. Didn't deserve that at all. Heavily involved in the opener and should be proud.
Memphis Depay (ST) - 5/10 - Fluffed two excellent chances early on and disappeared for a lot of the game, but managed to save the day with a smart finish.
Gavi (LW) - 6/10 - Not his best performance but won't forget the day he bodied Raul Albiol.
Ousmane Dembele (RW) - 5/10 - Asked to defend after coming on which was just pointless for everyone.
Oscar Mingueza (LB) - 5/10 - Looked nervous after coming on. Really didn't want anything to do with Samu Chukwueze.
Philippe Coutinho (CM) - 7/10 - Won the late penalty and took it well.