Cheltenham Town came within nine minutes of one of the biggest shocks in recent FA Cup history before Manchester City staged a dramatic late rally to crush the dreams of the gallant League Two side.

The Robins, 72 places below City who sit second in the Premier League, threatened huge embarrassment for Pep Guardiola’s side after Alfie May put Cheltenham ahead on the hour after a trademark long throw from captain Ben Tozer caused chaos in the area.

City, who made ten changes to the team that beat Aston Villa in the Premier League on Wednesday, spared their embarrassment when Phil Foden, the game’s outstanding player, arrived at the far post to turn in substitute Joao Cancelo’s long cross in the 81st minute.

And the turnaround was complete three minutes later when a rare moment of slackness in the outstanding Cheltenham defence, with goalkeeper Josh Griffiths superb, switched off and Gabriel Jesus scored from Fernandinho’s delivery.

Ferran Torres scored Manchester City’s third with the last kick of the game to give the scoreline a cruel reflection on Cheltenham’s heroic efforts.

It was so cruel on manager Michael Duff and his players, who now go back the battle for promotion from League Two, while City will be away at Swansea in the fifth round.

“I’m incredibly proud,” the Robins boss said of his side’s display. “The players they brought on from the bench and they way they celebrated the goals tells you something. They know they’ve been in a game. They’ve done that to better teams than us.”