Nathan Broadhead and Matty James came in for Wrexham, who were without Lewis O’Brien because of shoulder and knee injuries suffered in the loss at Swansea City, while captain James McClean started a three-game ban following an off-the-ball incident in the same game.

Goalkeeper Arthur Okonkwo retained his place despite a stoppage-time error which had gifted Swansea’s winner in the Welsh derby.

Sheffield United, whose boss Chris Wilder selected the same side which had beaten Birmingham City so comprehensively last Saturday at Bramall Lane, showed their intent early on with Sam McCallum’s dangerous cross headed wide by Callum O’Hare.

It was another cross, this time from Femi Seriki, which led to the opening goal as Bamford connected with the ball and his volley looped over Okonkwo and into the net.

United’s lead lasted barely two minutes as former Sheffield Wednesday forward Windass’ shot, from George Thomason’s cross, went in off Bindon for Wrexham’s leveller.

In what was a very open and frenetic game, the visitors regained their lead with only 15 minutes gone and once again it was Bamford scoring from a Seriki cross.

Moore, who joined Wrexham from United in the summer, had a goalbound header nodded off the line by Ollie Arblaster before the visitors scored their third goal.

McCallum’s long throw-in was inadvertently flicked on by Moore towards the direction of O’Hare, who headed home from close range to extend his side’s lead.

Moore made amends when he reduced the deficit with a header from Thomason’s corner.

The final 15 minutes of the half did not produce any further goals, but there was no let-up in the pace of the game as Wrexham penalty appeals for handball were rejected, while at the other end Okonkwo denied Tahith Chong.

Wrexham were level six minutes into the second half with Longman heading home from Thomason’s cross.

Windass’ powerful shot soon after drew a good save from Michael Copper, with Broadhead putting the rebound wide.

Broadhead set up his Wales international colleague Moore, who put Wrexham ahead for the first time with 14 minutes remaining.

Okonkwo made a crucial save to deny Arblaster before Windass sealed the comeback with a penalty, sending Cooper the wrong way after Thomason had been felled by Bindon.

Substitute Tyrese Campbell’s volley hit the underside of the crossbar in stoppage time, the last act of an extraordinary game.