Mansfield survived the sending-off of striker Matt Green to hold York in the first leg of their Blue Square Bet Premier play-off semi-final.
The Stags took the lead when Ross Dyer flicked home Exodus Geohaghon's long throw at the near post.
But the centre-back then turned a right-wing cross from former Mansfield player Jon Challinor into his own net.
Green was shown a second yellow card for handball, while Chris Smith and Ashley Chambers went close for York.
The Stags came into the game on the back of six successive wins, but it was the hosts who started the brighter and Matty Blair thought he had given them the lead from close range, only to be flagged for offside.
This stirred Mansfield and they took the lead when Dyer got in front of everyone to glance in Geohaghon's powerful throw.
The Minstermen looked rattled and almost went further behind when Dyer's header across goal nearly reached the on-rushing Gary Roberts.
Geohaghon put through his own net from Challinor's inswinging centre after a communication breakdown between him and goalkeeper Alan Marriott.
The lively Jason Walker then came close to putting York in front before the break when he dragged his shot from 16 yards just wide.
The pace of the game dropped in the second half and both teams started picking up bookings before Green, cautioned in the first half for a foul on keeper Mike Ingham, was sent off for a silly handball when through on goal.
York looked to make the most of their numerical advantage but Smith and Chambers both fluffed their lines from close in.
Substitute Adriano Moke fired straight at Marriott from 20 yards in the final minute as the Stags held out to take a draw into the second leg at Field Mill on Monday.
However they will have to do without their 29-goal top scorer following his one-match automatic suspension for his red card.
VIEWS FROM THE DRESSING ROOM
York City manager Gary Mills told BBC Radio York:
"I thought the lads did well. Mansfield get the ball forward early, tried to win the second ball, long throws.
"They got the goal from the long throw. We didn't deal with it and you've seen when a long throw goes in like that it is difficult.
"But we've got to deal with these. If we do, we'll end up winning the game on Monday. It's all to play for. If we're patient I think we'll go through."
Mansfield Town manager Paul Cox told BBC Radio Nottingham:
"I am happy with the result but I don't think we played particularly well. We said that to the lads, they know they did not play well.
"But what we have done is ground out a result. In any shape or form when you come to York and go away with a 1-1 then you are happy.
"For us to progress we have to get back to believing who we are and what we are and what we are good at."