Harrogate Town came out on top in the first North Yorkshire derby of the season in front of a sold out CNG Stadium.
Joe Leesley gave Town the lead after 15 minutes from the spot after York ‘keeper Jon Worsnop had brought down Jordan Thewlis.
Liam Agnew then scored on his first start of the season six minutes into the second half to put the hosts in a commanding positon.
Despite York City testing James Belshaw, and striking the post through Sean Newton, it was Town who collected the three points that ensure they stay top of the National League North, and move 11 points clear of their opponents.
Simon Weaver made one change from last weekend’s FA Cup win over Penistone, as Liam Agnew replaced the departed David Morgan.
The visitors also made one change, as Kaine Felix replaced Jon Parkin, while Fernando Moke returned to the bench after a six match absence.
With both sets of fans in fantastic voice from the off, Jack Emmett had the contest’s first shot, but saw his early attempt blocked.
It was Town stopper James Belshaw who had to make the first save of the afternoon though, keeping out Alex Whittle’s low drive after 14 minutes.
From the resulting passage of play, Jordan Thewlis chased down a clearance, bundled his way past York’s struggling defender and was taken to ground by Jon Worsnop.
Referee Scott Simpson pointed to the spot allowing Leesley to step up and smash the ball down the middle to put his side a goal ahead.
York almost pulled level ten minutes later as Whittle again got forward, but this time curled just over the bar.
With eight minutes to go until the break, Thewlis found himself in space and in a good shooting position, though Hamza Bencherif recovered well to deflect the shot behind for a corner.
Six minutes after the restart, Agnew marked his return from injury with a first Harrogate Town goal, cutting inside and seeing his right footed shot deflected past Worsnop.
Louis Almond tried to get his side back into the game soon after, but twice saw his shots fly off target.
Thewlis then had the chance to put the result beyond doubt after Josh Falkingham’s low cross, but could only divert past the near post with 67 minutes gone.
Leesley was next to go close for Weaver’s men, cutting back inside on his left foot and forcing Worsnop into a good save at his near post.
With the deficit only at two, York still had hope of a comeback, and nearly pegged Town back with under 20 minutes to go as Captain Sean Newton struck the post with a bobbling effort.
Myers then tried his luck at beating Belshaw, but Town’s stopper kept out the effort and Warren Burrell hooked away the rebound.
Despite the visitors doing all they can to find a way back into the game, it was Town who went close next as Ben Parker shot just wide of the far post.
Belshaw was forced into saving another shot from Newton with two minutes to go, though Town’s lead was never in question and Weaver’s side went on to claim all three points.
Harrogate Town: Belshaw, Fallowfield, Parker, Falkingham, Kennedy, Burrell, Thomson, Emmett, Leesley, Thewlis (Burdett 85), Agnew (Vann 77)
Subs not used: Cracknell, Middleton, Curry
Goals: Leesley (p) 15, Agnew 51
York City: Worsnop, Law (Sukar 45), Parslow, Bencherif, Whittle, Heslop, Wharton (Smith 69), Newton, Morgan-Smith, Almond, Felix (Moke 45)
Subs not used: Simpson, Edmondson
Referee: S Simpson