FC Halifax Town will play away at FC United or Harrogate Town in the fourth qualifying round of the FA Cup.
Town beat Stalybridge 2-1 on Saturday in the third qualifying round, and have also beaten Ashton Athletic 5-0 in the competition this season.
FC United and Harrogate drew 3-3 on Saturday and will replay the tie at Harrogate on Tuesday night.
FC United are currently 17th in the National League North, with Harrogate in second.
The game will be played on Saturday, October 15. Town will receive £12,500 if they progress to the first round.