York City remain in the play-off places with victory over Ebbsfleet, despite playing 75 minutes with 10 men.
Matty Blair converted Jon Challinor's cross to give the hosts the lead, before Scott Brown was given a straight red card for a challenge on Ram Marwa.
Tom Phipp's cross was met by Nathaniel Pinney to level, while Blair scored his second from Jamie Reed's pass.
Blair turned provider to set up James Meredith and Calum Willock converted Marwa's clever pass for a consolation.
VIEWS FROM THE DRESSING ROOM
York City manager Gary Mills told BBC Radio York:
"I really think my players have shown what we're about this season. I think they've shown they want it.
"To come back after the equaliser in the second half early on like we did, that's what my set of players are about. I'm delighted.
"We've had everything today and to get three points and again three goals it's magnificent. An unbelievable effort."
Ebbsfleet manager Liam Daish told BBC Radio Kent:
"It was three situations where it was poor defending. We didn't keep it at 1-1 long enough.
"Had we kept it at 1-1 a bit longer we would have gone on and won it.
"They were very disciplined. It's harder away against a team like York with their resources."
Sorry, we were unable to load match stats, please try again.