Wick Academy and Whitehill Welfare were forced to a replay after a remarkable conclusion which saw Wick take the lead in the 92nd minute only to concede an equaliser with virtually the last kick of the ball.
Whitehill right back Andrew Martin’s last-gasp rebound cancelled out Steven Anderson’s stunning strike to leave Wick with a 530-mile round trip on Saturday.
Wick manager Gordon Connelly said: “We thought we’d won it and I’ve let myself go and celebrated but football can be a funny game.
“It’s done and dusted now and we can’t grumble about it. We’re excited to still be in the cup and in the draw for the next round.
“I didn’t think we were at our best today but I can assure everyone we’ll be better next week.”
Wick felt aggrieved not to have been awarded at least one penalty in the early stages of the game as Davie Allan twice appeared to be bundled over inside the Whitehill box, but the referee remained unmoved.
Whitehill took the lead in the 25th minute with what was the first shot on goal of the game. Callum Connelly collected the ball 25 yards out and smashed an unstoppable shot into the top corner.
Wick levelled in the 34th minute when Danny Mackay’s in-swinging free kick was headed powerfully home at the near post by Gary Weir.
The home side appeared to have won it in stoppage time when Anderson controlled Grant Campbell’s cross-field pass on his chest, fought past Dale O’Hara and rifled a half-volley into the net.
But Whitehill found an equaliser when Anthony Muir’s low shot was parried by Sean McCarthy and Martin was quickest to react to the rebound.
Whitehill manager Grant Carnie said: “I thought it was all over at 2-1 but that’s what we get when we play right to the end and it now feels like a win.”