Alex Hunt’s stoppage-time penalty earned York a dramatic 2-1 win over Dagenham and Redbridge.
Hunt struck for the 10-man Minstermen, who had Ollie Pearce sent off late on, to restart their pursuit of leaders Barnet.
City lost to Boston last time out and left it until the 43rd minute to go in front here, Tyrese Sinclair nodding in at the back post.
Josh Umerah headed the Daggers level six minutes after the break and it looked as though it would stay that way until Hunt kept his nerve at the death.
York are six points shy of Barnet with two games in hand.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.