IMAGO/Pressinphoto/Alex Carreras

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.

More must-reads:

TODAY'S BEST
Three takeaways as Panthers eliminate Rangers, advance to Stanley Cup Final
Corey Heim dominates at Gateway for fourth Truck Series win of 2024 season
Mets honor Darryl Strawberry in fitting fashion during number retirement ceremony
Phillies ace leaves game after taking 106 mph comebacker to hand
Real Madrid defeats Borussia Dortmund 2-0 to win Champions League
Marvin Lewis opens up about about return to NFL coaching
Celtics HC shares Kristaps Porzingis update ahead of NBA Finals
Jalen Brunson claps back at tiredness narrative after Knicks' playoff exit
Red Sox lose yet another player to injury
Former NFL GM has huge praise for Packers QB Jordan Love
Drake Maye reportedly being treated as Patriots' QB3
Veteran 1B rejects outright assignment, elects free agency
Giannis Antetokounmpo to play for Greece in Olympic qualifier
Padres lose two top pitchers to injured list on same day
Fever announce remarkable attendance milestone in fifth 2024 home game
Senators reportedly undecided on qualifying defenseman
Lamar Jackson's curious offseason decision costing him significant money
Blue Jays two-time All-Star pitcher lands on IL for second time this season
Lakers set to benefit from Pelicans’ NBA Draft decision
One rookie quarterback is showing 'elite downfield accuracy' during OTAs