Mansfield overcame struggling York to extend their unbeaten run to six league matches.
York made the perfect start when Ryan Brobbel marked his home debut with a third-minute opener.
A Sam Clucas penalty and a fortunate effort from Ollie Palmer condemned York to their fourth successive defeat.
Both teams ended the game with 10 men after Richard Cresswell and Martin Riley were sent off for an off-the-ball incident.
Mansfield were awarded their spot-kick after Lanre Oyebanjo brought down James Jennings in the box.
VIEW FROM THE DRESSING ROOM
York City manager Nigel Worthington told BBC Radio York:
"Same old result and I think that's where we are at the moment so we have just got to keep going.
"Apart from the result I couldn't fault the players in any department, the commitment the effort the quality at times was very good.
"They're trying to do what we're asking them to, so more of the same next week and try and change the result because there was so many good things in the game today - the opposite to last week and still the same result.
"We've just got to keep plugging away, keep believing and trying to win."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.