Sutton reserve goalkeeper Wayne Shaw has agreed to resign from the club after eating a pie in the dugout during Monday’s FA Cup defeat to Arsenal.

A betting row erupted as a result of the incident and manager Paul Doswell confirmed Shaw’s departure on Tuesday afternoon.

Shaw was shown on television tucking into the snack towards the end of the 2-0 loss before admitting after the game he was aware that a bookmaker was offering odds on him to do so.

“Wayne has offered his resignation to the chairman this afternoon and that has been accepted. It’s a very sad end to what was a very good story,” Doswell told Sky News.

Both the Football Association and the Gambling Commission announced on Tuesday that they would carry out independent investigations into the publicity stunt.

Sun Bets tweeted after the game that they had paid out a “five-figure sum” on a bet that 46-year-old Shaw would be shown eating a pie.

The goalkeeper, who also worked as a coach for the club, said after the game he “would give them a bit of banter”.

Doswell confirmed both investigating bodies had been in touch with the club and said Shaw had made a “very genuine mistake” after being a big part of the media build-up to the cup-tie.

“Of course we’ve been contacted by the FA, the betting commission, and it’s been a very sobering morning,” he said.

“At the moment it’s early days and it’s by way of e-mails and other bits and pieces but unfortunately it’s worldwide news this morning

“It’s taken the gloss off my players’ performance and gone on to something it shouldn’t have gone on to. I feel very sorry for the players in many regards that that spotlight has been taken away from them.

“It was an honest error but one that’s had quite sad ramifications. Wayne’s been swept along with what’s happened in this last three or four weeks.

“Since the camera got him in the Leeds United game he’s gone into another world in terms of what he’s used to.

“I think he’s been ill-advised at times and he’s just made a very genuine mistake. If you knew him, he’s such a lovely, lovely man. His judgement wasn’t great last night and he’s obviously paid the price for that.”