Manuel Pellegrini was relieved to avoid a ‘damaging’ defeat after West Ham came from behind to beat AFC Wimbledon 3-1 in the Carabao Cup.

But Wimbledon boss Neal Ardley accused Javier Hernandez of a blatant dive which forced his spirited side to play with 10 men for the majority of the match.

Rod McDonald saw red for a second booking after only 18 minutes for a foul on Mexico striker Hernandez.

“The sending-off is soft. For me it’s a game changer and from that moment on the game was ruined,” said Ardley.

“Was it a dive? For the contact there was, absolutely. It’s not like a yank of the arm, it’s an arm on an arm, and he wasn’t getting the ball anyway.

“We make comments about stopping diving but you don’t get anything if you don’t dive. It’s a big bug bear of mine but we have to get on with it.”

By then West Ham were already a goal down, having fallen behind after less than a minute and a half to a header from Joe Piggott, who was playing non-league football last season.

Bottom of the Premier League after three straight defeats, the trip to Kingsmeadow was supposed to provide some sort of pick-me-up for the Hammers – but for a while they looked destined for a humiliating defeat.

West Ham threw on £42million record signing Filipe Anderson at half-time but needed a long-range rocket from Issa Diop to level matters in the 62nd minute

Angelo Ogbonna headed a second with eight minutes left and Hernandez struck in stoppage time to ensure West Ham’s already poor start to the season did not plumb new depths.

“I’m happy because we did our job against a team playing with one player less,” said Hammers boss Pellegrini.

“We were obligated to win this game but when you are losing 1-0 it’s not easy when you cannot score. I think we kept calm all game, we continued trying.

“It was important because when you continue losing, you need to win, the mind of the players, they need to continue trusting.

“We did our duty to eliminate Wimbledon but if we were the team eliminated it would have caused a lot of damage.”