York secured their first victory since January against Tamworth.
City took the lead in spectacular style through Paul Groves, who rifled the ball into the top corner from 20 yards out from Paul Robinson's lay-off.
York added a second when Darren Dunning failed to connect properly with Andy Bishop's cross, but Robinson showed a great touch before firing home.
Neil Ross volleyed over in the early stages for Tamworth, while Mark Cooper had two chances after the break.
York: Crichton, Law, Davis, Clarke, Smith, Brass (Arthur 90), Groves, Dunning, Stewart, Robinson, Bishop (Yalcin 85). Subs Not Used: Porter, Merris, Nogan.
Goals: Groves 15, Robinson 60.
Tamworth: Price, Adie Smith, Brown, Johnson (Shaw 80), Stamps, Blunt, Cooper, Ebdon, Sheppard (May 67), Whitman, Ross. Subs Not Used: Bampton, Nick Smith, Turner.
Booked: Ross, Stamps.
Ref: P Canadine (Rotherham).