For Town,Liam Agnew returned to replace David Morgan who joined Southport in midweek.
Town made the early running as the Minstermen struggled to find their feet.
A Joe Leesley centre was easily cut out by City keeper,Jon Worsnop,and Josh Law had to turn another Leesley cross over his own bar,after a penetrative run from Jordan Thewlis.
However,after a quarter of an hour,the game finally caught fire.
In City’s first meaningful attack,a superb low cross shot from Alex Whittle was brilliantly saved by James Belshaw.
The ball was quickly transferred downfield and Thewlis was brought down by Worsnop as he tried to round the keeper.
Leesley stepped up to lash the resulting penalty past the Worsnop,to the delight of the majority of the huge crowd.
Warren Burrell,then pushed forward to head a George Thomson centre wide,but it was the visitors who began to dominate.
An excellent York move ended with Whittle firing over,while both Louis Almond and Hamsa Bencherif also blazed attempts well over Town’s goal.
The pace of Jack Emmett was troubling the City defence and as half time approached he played in Thewlis,whose shot trickled across the face of the goal.
York made a double substitution at the break,Jassem Suker and Adriano Moke replaced Law and Kaine Felix.
Unfortunately for City,it was Town who were next to strike.
Six minutes into the half,Ben Parker found Agnew on the left,but there appeared little danger as he cut across the penalty area,but his shot took a wicked deflection to beat Worsnop.
York hit back with Almond striking Sean Newton’s free kick across goal,then minutes later, he curled a shot wide of the upright.
Thewlis had a chance to put the result beyond doubt but he stabbed Josh Falkingham’s cross just the wrong side of the post from close range.
York,with the mercurial Moke well to the fore,pressed hard to take something from the game and Newton crashed a tremendous shot against the upright after the Town defence failed to clear a corner.
Next,a shot from Almond was well blocked by Belshaw,but it needed Ryan Fallowfield to complete the clearance.
Town were still posing a threat and Leesley broke away to find Ben Parker and his shot flashed dangerously across the face of the City goal.
It just remained for Belshaw to keep out Newton’s late powerful drive and Town were, home and hosed, to secure the North Yorkshire bragging rights,at least till the return game in April.
Town, Belshaw,Fallowfield,Parker (c),Falkingham,Kennedy,Burrell,Thomson,Emmett,Leeley,Thewlis(Burdett 85),Agnew (Vann 77).
Goals Leesley 15 pen,Agnew 51. Town Man of the Match Falkingham. Att.2800
York City,Worsnop,Law (Suker 45),Parslow,Bencherif,Whittle,Heslop,Wharton,(Smith 69),Newton,Morgan-Smith,Almond,Felix(Moke 45).
Unused subs,Simpson,Edmonson. Booked Worsnop. Referee S Simpson.