Highlights: Barcelona 3-5 Villarreal - Watch All Eight Goals From Crazy Game in La Liga
Xavi Hernandez announced on Saturday night that he will be standing down as manager of Barcelona in June.
His announcement came immediately after his Barcelona team had been beaten 5-3 at home by Villarreal in a crazy game in La Liga.
Barca went from 2-0 down to 3-2 up before Villarreal equalized in the 84th minute.
The away side then netted two goals deep into added time to leave Barca 10 points behind rivals Real Madrid - who had earlier won 2-1 at Las Palmas.
Gerard Moreno had a goal harshly ruled out for a foul before opening the scoring for real with a powerful first-time finish from 14 yards on 41 minutes.
It was 2-0 eight minutes into the second half after Barcelona failed to deal with a long kick from keeper Filip Jorgensen that eventually found Ilias Akhomach, who finished brilliantly.
Three Barcelona goals in 11 minutes then turned the game on its head.
Ilkay Gundogan started the comeback with a fine low shot from the edge of the penalty area on the hour-mark.
Pedri then drilled Barca level with a fierce left-footed strike before an own goal by Eric Bailly put the home side in front.
But Goncalo Guedes rocketed Villarreal back to parity with his first goal since signing from Benfica on loan.
Some shambolic defending later allowed Alexander Sorloth to put Villarreal 4-3 ahead in the ninth minute of added time.
Ronald Araujo was one of the players at fault for Villarreal's fourth goal.
Araujo had the chance to atone straightaway but he missed the ball when attempting to score from ultra close range.
The Barca defender reacted to his miss by picking up the Villarreal keeper's towel and angrily throwing it to the ground.
While Araujo was having a meltdown, Villarreal launched a counter-attack and it ended with Jose Luis Morales scoring the eighth goal of an amazing game.
Highlights: Barcelona 3-5 Villarreal
If you cannot view either of the videos above, CLICK HERE to watch match highlights via La Liga's official YouTube channel.