Wes Fletcher struck a late killer blow as York inflicted a shock 2-1 defeat on promotion-chasing Fleetwood.
A combination of errors from the home side gifted City the lead just before the break. A breakdown in communication down the Fleetwood left handed the visitors a corner, Will Hayhurst drifted the ball into the near post and Conor McLaughlin flicked it past his own goalkeeper.
The visitors could easily have doubled their advantage after the break, Fleetwood 'keeper Scott Davies, wrong-footed by the wind, just about recovering to deny Fletcher a tap in.
The hosts were playing well below the standard that had fired them into the automatic promotion chase but did level with 18 minutes remaining.
Alan Goodall fired a free-kick over from the right channel, Jon Parkin tangled with York stopper Nick Pope and substitute Mikael Mandron picked up the pieces, the on-loan Sunderland man bagging his first for the club with a thumping drive at the back post.
The home side pushed for a winner and nearly got it when David Ball rattled the woodwork with a bullet header.
But it was the Minstermen who struck in added time, Michael Coulson breaking down the left and driving the ball across for Fletcher to flick it past Davies for his ninth league goal of the season.