West Ham staved off potential embarrassment in the FA Cup by scoring an 83rd-minute goal to see off non-league Stockport 1-0 in the third round on Monday.

A game that was briefly paused in the 15th minute because of a fireworks display near Edgeley Park failed to light up as West Ham struggled to cope with a cut-up, boggy field and driving rain against an opponent from the fifth tier.

It was left for Craig Dawson to save the visitors as the game approached a period of extra time, the center back timing his late run into the penalty area to perfection to meet an inswinging cross by Jarrod Bowen and head the ball into the bottom corner.

West Ham's Mark Noble, right, tries to block a shot from Stockport County's Liam Hogan during the English FA Cup third round soccer match between Stockport County and West Ham United at Edgeley Park in Stockport, England, Monday, Jan. 11, 2021. (Martin RickettPool via AP)

West Ham's Mark Noble, right, tries to block a shot from Stockport County's Liam Hogan during the English FA Cup third round soccer match between Stockport County and West Ham United at Edgeley Park in Stockport, England, Monday, Jan. 11, 2021. (Martin RickettPool via AP)

It earned West Ham a home match against third-tier Doncaster in the fourth round.

Stockport was looking to follow fellow non-league team Chorley, which eliminated second-tier Derby on Saturday, in humiliating a side from the leading divisions, and included John Rooney — the brother of Derby manager and former Manchester United striker Wayne Rooney — in its lineup.

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports

West Ham's manager David Moyes, centre, reacts during the English FA Cup third round soccer match between Stockport County and West Ham United at Edgeley Park in Stockport, England, Monday, Jan. 11, 2021. (Clive BrunskillPool via AP)

West Ham's manager David Moyes, centre, reacts during the English FA Cup third round soccer match between Stockport County and West Ham United at Edgeley Park in Stockport, England, Monday, Jan. 11, 2021. (Clive BrunskillPool via AP)

West Ham's Said Banrahma, left, duels for the ball with Stockport County's Sam Minihan during the English FA Cup third round soccer match between Stockport County and West Ham United at Edgeley Park in Stockport, England, Monday, Jan. 11, 2021. (Martin RickettPool via AP)

West Ham's Said Banrahma, left, duels for the ball with Stockport County's Sam Minihan during the English FA Cup third round soccer match between Stockport County and West Ham United at Edgeley Park in Stockport, England, Monday, Jan. 11, 2021. (Martin RickettPool via AP)