West Ham moved into the fourth round of the FA Cup as they battled past National League side Stockport County.
Said Benrahma nearly grabbed his first Hammers goal in the sixth minute but his shot hit the foot of the post.
With the match played in heavy rain, chances were at a premium before Craig Dawson headed in from Jarrod Bowen's cross late on for the winning goal.
The Hammers will play at home to League One side Doncaster Rovers in round four over the weekend of 23-24 January.
The winners of that tie will then be away at Manchester United or Liverpool - currently second and first respectively in the Premier League - in the fifth round.