Ollie Pearce posted a brilliant hat-trick as promotion-chasing York cruised past a Yeovil side who played 80 minutes with 10 men and ended with nine.
The Minstermen lost to rivals Forest Green last time out but overtook them at the top with this victory.
Finn Cousin-Dawson was sent off for a last-man foul in the 10th minute and Pearce put the free-kick away brilliantly to open the scoring.
Tyrese Sinclair made it two on the stroke of half-time, before Pearce broke in to add his second three minutes after the hour.
Pearce was denied his treble from close range but got it from the subsequent corner after 71 minutes, before Dominic Bernard was sent off in the last minute.
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.