A magnificent victory vanishes any lingering fears of relegation and sends Gary Mills' York back to the brink.