An Ashley Chambers brace helped York City record their first win in four matches against Dagenham & Redbridge.
The Minstermen went in front after Chambers curled his shot beyond Daggers keeper Chris Lewington.
Visitors defender Luke Wilkinson levelled things with a close-range header but York restored their lead as Chambers headed home his second.
Matty Blair slotted home from close in to extend the hosts' lead before Wilkinson got one back late on.
Blair played despite picking up an injury on the training ground this week when he collided with a dummy.
VIEWS FROM THE DRESSING ROOM
York City manager Gary Mills told BBC Radio York:
"I thought we deserved the win today. I thought we were the better side.
"Dagenham play how they play and you have to win as many second balls as you can to get playing early on in the game.
"I didn't think we won as many as I would have liked but we got our noses in front.
"We've threatened to complement our away results with a win at home and could quite easily have done that two or three other times.
"It's a fantastic result for us so we deserved it."