AFC Wimbledon rekindled the Crazy Gang spirit of years gone by to produce a shock 4-2 FA Cup victory over West Ham.

The Dons, languishing at the foot of League One and heavily beaten by Barnsley and Fleetwood in their last two matches, were hardly given a prayer of getting past the Premier League Hammers.

But they did not just knock them out, they outplayed and outmuscled them for the best part of an hour, Scott Wagstaff scoring twice after Kwesi Appiah’s opener.

Substitutes Lucas Perez and Felipe Anderson raised hopes of a comeback for the Hammers, but they were extinguished when Toby Sibbick struck the fourth two minutes from time.

Instead West Ham slunk back to east London on the end of surely one of the most embarrassing defeats in their history, the club who spent £100million in the summer sent packing by a team of youngsters and free transfers.

Marko Arnautovic was not in the West Ham squad despite attempting to clear up his future late on Friday night with a statement insisting he was committed to the club, for now at least.

The Austrian striker had his head turned by a mega-money offer from China earlier this month, but claimed he wanted to stay and “try to win the cup”.

That will not be happening now, despite Manuel Pellegrini naming a strong starting XI, with former West Ham coach Wally Downes instead celebrating a win almost as unlikely as their 1988 final victory over Liverpool.

It is not as if the Hammers had not been warned. They had conceded a goal in the opening two minutes when they won here in the Carabao Cup earlier this season.

And Wimbledon, playing their first FA Cup fourth-round tie since their reformation in 2002, had West Ham rattled in the opening stages and Terrell Tomas blazed an excellent chance over the crossbar from 10 yards out.

Then Mitch Pinnock’s cross-shot from a free-kick forced an unconvincing punch clear from Hammers keeper Adrian, who also did well to hold a header from Pinnock at his near post.

Appiah, back in the team for the first time since he scored the last-minute winner against Fleetwood in round three, struck the deserved opener 11 minutes before half-time.

Worse was to come seven minutes later, Pedro Obiang allowing Wagstaff to rob him on the halfway line and race through.

The former Charlton midfielder still had plenty to do but kept his composure to beat the onrushing Adrian and give the minnows a 2-0 half-time lead.

A clearly unimpressed Pellegrini made a triple substitition at half-time, turning to Ryan Fredericks, Lucas and record signing Anderson.

But 41 seconds later his side unthinkably found themselves three goals down, Appiah crossing for Wagstaff to poke home from 12 yards out.

Perez pulled one back in the 57th minute, sweeping the ball home after a goalmouth scramble, and when Anderson curled in a delightful free-kick with 20 minutes remaining alarm bells began to ring for the hosts.

Wimbledon’s Tennai Watson was possibly too honest by continuing his run after he was clipped by Arthur Masuaku in the area, whereas had he gone down a penalty could have put the game to bed.

However, Sibbick brought the house down with an 88th-minute header to seal a memorable victory and compound West Ham’s embarrassment.