Promotion-chasing York extended their unbeaten run in the Enterprise National League to 19 games as they held on for a nervy 2-1 win over Forest Green.
Alex Hunt opened the scoring for the Minstermen at the LNER Community Stadium with a 16th-minute penalty after a foul on Jeff King.
Ollie Pearce doubled the lead in first-half stoppage time following a break from deep, but Forest Green hit back after 65 minutes through Kyle McAllister.
Rovers wanted a penalty for handball against Mark Kitching as they pushed for an equaliser in the closing stages, but nothing was given and York survived.