Alex Bradley capped his Harrogate Town debut with a dramatic late winner, striking in stoppage-time to sink Stockport County.
Mark Beck's 54th-minute goal handed Simon Weaver's team a deserved advantage at a sun-soaked CNG Stadium, though they went on to gift their visitors a route back into the game.
And the match looked to have petered out into a stalemate before Bradley popped up to decide matters with 93 minutes on the clock, sealing a first victory in four attempts for his new club.
The opening exchanges were fairly even with both sides playing some good football despite the heat, creating decent openings without ever really threatening to break the deadlock.
The best chance of the first 45 fell to Town debutant Bradley after Jack Muldoon hooked the ball over the top of the visiting defence and sent him in on goal down the right.
He couldn't find a finish, however, rather pulling his strike across goal and wide of the far post.
Either side of that, County's biggest threat, Alex Thomas, had forced James Belshaw into a decent block at his near post and blasted a snap-shot narrowly wide of the mark.
The half ended with Ryan Fallowfield overlapping down the right to good effect, shooting hard and low and drawing a smart save out of Ben Hinchliffe in the Stockport goal.
Town began the second period much the brighter of the sides and another Fallowfield raid from right-back led to them opening the scoring.
Josh Falkingham threaded an intricate pass through the eye of a needle for the marauding defender to run on to and deliver an inviting low cross that Beck buried from close range.
Beck then showed a more delicate side to his game, delightfully flicking the ball first-time over the top of the Hatters' back-line for Bradley to race in on Hinchliffe's goal for a second time.
Once again, the Lincoln City loanee failed to finish though, firing straight at the advancing Hinchliffe from a tight angle.
And Town were once again punished for their wastefulness in front of goal as County drew level in the 70th minute.
It was an utterly avoidable goal too, Falkingham failing to clear his lines inside his own box - either trying to see the ball out or buy a foul close to the byline - allowing County to pull the ball back for Nyal Bell to smash in an equaliser.
Having looked good value for their lead at 1-0, things went a bit flat from a Harrogate perspective after Stockport's leveller and the visitors began to look the more likely.
It was Town who finished the stronger, however, going on to strike a decisive blow in the third minute of stoppage-time.
Kiernan carried the ball inside from the right and picked out Bradley on the edge of the area, the ex-West Bromwich man opening up his body before stroking a fine low effort past the despairing dive of Hinchliffe and into the bottom corner.
Victory for Weaver and his men up to 13th place in the National League standings.