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."
Adriano Moke has an effort at goal from 30 yards. Comfortable save by Alan Marriott.
90:00 +1:33 Substitution
Substitution Ross Dyer leaves the field to be replaced by Matt Rhead.
Corner taken by Ashley Chambers.
The ball is swung over by Jon Challinor, Ashley Chambers has a headed effort at goal from close in which goes wide of the left-hand upright.
Corner taken right-footed by Ashley Chambers from the left by-line, Shot on goal by Matty Blair from just inside the area clears the crossbar.
Long distance shot from Jon Challinor misses to the left of the goal.
Foul by Adam Murray on Matty Blair, free kick awarded. Ashley Chambers restarts play with the free kick.
Luke O'Neill delivers the ball, save by Michael Ingham.
The referee blows for offside. Alan Marriott restarts play with the free kick.
Substitution Adriano Moke joins the action as a substitute, replacing Patrick McLaughlin.
Short corner taken by Matty Blair from the right by-line, Header from deep inside the area by Chris Smith goes harmlessly over the crossbar.
Short corner taken by Patrick McLaughlin.
Substitution Lindon Meikle leaves the field to be replaced by Louis Briscoe.
Jamal Fyfield crosses the ball.
Matty Blair sends in a cross, Alan Marriott makes a save.
Michael Ingham takes the direct free kick.
Dismissal Matthew Green receives a red card.
Matthew Green challenges Michael Ingham unfairly and gives away a free kick.
Matty Blair concedes a free kick for a foul on Danny Andrew. Danny Andrew takes the direct free kick.
Booking Gary Roberts is booked.
Unfair challenge on James Meredith by Gary Roberts results in a free kick. Free kick taken by Patrick McLaughlin.
Luke O'Neill restarts play with the free kick.
Booking James Meredith is cautioned by the ref for unsporting behaviour.
Anthony Howell fouled by James Meredith, the ref awards a free kick.
The ball is sent over by Jamal Fyfield.
Outswinging corner taken by Patrick McLaughlin from the left by-line. Inswinging corner taken by Patrick McLaughlin, Alan Marriott makes a save.
The ball is crossed by Jon Challinor.
Unfair challenge on Luke O'Neill by Jamal Fyfield results in a free kick. Direct free kick taken by Luke O'Neill.
A cross is delivered by Matty Blair, James Meredith takes a shot. Exodus Geohaghon gets a block in.
Unfair challenge on Jon Challinor by Gary Roberts results in a free kick. Direct free kick taken by Jon Challinor.
The offside flag is raised against Matthew Green. Indirect free kick taken by Michael Ingham.
Patrick McLaughlin sends in a cross, Chris Smith takes a shot. Alan Marriott makes a comfortable save.
Booking Booking for Danny Andrew for unsporting behaviour.
Danny Andrew challenges Matty Blair unfairly and gives away a free kick.
Exodus Geohaghon takes a shot. Blocked by Patrick McLaughlin. Corner from right by-line taken by Luke O'Neill.
Ritchie Sutton takes the direct free kick.
Booking Jamal Fyfield booked.
Foul by Jamal Fyfield on Ross Dyer, free kick awarded.
Anthony Howell produces a volleyed left-footed shot from 18 yards. Fantastic save by Michael Ingham.
Shot on goal by Matthew Green from just inside the area goes over the target.
Inswinging corner taken by Patrick McLaughlin, Matty Blair produces a volleyed left-footed shot from 20 yards. Save by Alan Marriott.
James Meredith crosses the ball, Alan Marriott makes a save.
Exodus Geohaghon challenges Jason Walker unfairly and gives away a free kick. Direct free kick taken by James Meredith.
The referee blows his whistle to start the second half.
45:00 +3:33 Half time
Half Time It is the end of the first-half.
Effort on goal by Ross Dyer from just inside the area clears the crossbar.
Inswinging corner taken by Patrick McLaughlin, save by Alan Marriott.
Matthew Green takes a shot. Blocked by Chris Doig. Gary Roberts takes a shot from just inside the penalty box which clears the crossbar.
Effort on goal by Matty Blair from just inside the area clears the crossbar.
Inswinging corner taken from the right by-line by Patrick McLaughlin, Luke O'Neill manages to make a clearance.
Jason Walker produces a drilled right-footed shot from deep inside the penalty area which goes wide of the left-hand post.
Free kick awarded for an unfair challenge on Chris Smith by Matthew Green. Chris Smith takes the free kick.
Jason Walker has a volleyed shot. Alan Marriott makes a comfortable save.
41:33 Goal scored
Goal! - Exodus Geohaghon - York 1 - 1 Mansfield Exodus Geohaghon puts the ball into his own net. York 1-1 Mansfield.
Booking Matthew Green is shown a yellow card for unsporting behaviour.
Matthew Green challenges Michael Ingham unfairly and gives away a free kick. Direct free kick taken by Michael Ingham.
Shot from just outside the box by Patrick McLaughlin goes over the bar.
Foul by Adam Murray on Jason Walker, free kick awarded. Free kick taken by Patrick McLaughlin.
Ashley Chambers takes a shot. Alan Marriott makes a save.
Gary Roberts takes a shot. Michael Ingham makes a save.
Direct free kick taken by Luke O'Neill.
Booking Chris Smith is booked.
Chris Smith concedes a free kick for a foul on Matthew Green.
The referee blows for offside against Matthew Green. Michael Ingham restarts play with the free kick.
Gary Roberts concedes a free kick for a foul on Jon Challinor. Patrick McLaughlin restarts play with the free kick.
Assist by Exodus Geohaghon.
25:53 Goal scored
Goal! - Ross Dyer - York 0 - 1 Mansfield Ross Dyer finds the net with a headed goal from inside the six-yard box. York 0-1 Mansfield.
Free kick awarded for an unfair challenge on Gary Roberts by Jamal Fyfield. Direct effort from the free kick comes in from Luke O'Neill.
Patrick McLaughlin decides to take the corner short.
Adam Murray challenges Jason Walker unfairly and gives away a free kick. Free kick taken by Patrick McLaughlin. Matty Blair is flagged offside by the assistant referee. Alan Marriott takes the free kick.
Anthony Howell produces a header from inside the area that goes over the crossbar.
Substitution Danny Andrew comes on in place of Martin Riley.
James Meredith gives away a free kick for an unfair challenge on Gary Roberts. Free kick taken by Gary Roberts.
The ball is sent over by Ashley Chambers.
Lindon Meikle is ruled offside. Michael Ingham takes the free kick.
The assistant referee signals for offside against Patrick McLaughlin. Alan Marriott takes the indirect free kick.
Inswinging corner taken from the right by-line by Patrick McLaughlin.
Corner taken left-footed by Patrick McLaughlin, Chris Doig produces a right-footed shot from inside the area that clears the bar.
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.