Promotion-chasing York survived a late Wrexham fightback to claim a club record-equalling eighth successive win.
On-loan Chris Carruthers gave the hosts the perfect start with a free far-post header from Michael Rankine's cross.
Wrexham rallied after the break, Gareth Taylor having a header cleared off the line, while Wes Baynes' long-range strike was saved by Michael Ingham.
But Richard Brodie doubled York's lead with his 20th of the term, followed by Andrew Fleming's rapid consolation.
It was the first time the Minstermen had won eight games in a row since 1955.
And, despite Dean Saunders' Wrexham piling on late pressure, York did enough to hold out, to maintain third place in the table, four points adrift of second-placed Stevenage - and nine behind leaders Oxford.
Wrexham remain 15th in the table - now 10 points clear of trouble.
Wrexham manager Dean Saunders: "The first goal was a foul on Curtis Obeng. Our keeper Chris Maxwell says he was pushed over on the far post and the referee didn't see it.
"That gave them a goal start and they are a good team on a club-record winning run.
"We didn't batter them, but we outplayed them in the second half. The second goal came when we were chasing the game.
"We have to pick ourselves up for Altrincham next week. We've got to plough on."
Bookmark with:
What are these?