York City stunned Luton Town with two goals in the last 10 minutes at Kenilworth Road in the battle to make the Blue Square Bet Premier play-offs.
Andre Gray advanced down the right and squeezed a low shot in at the near post to outfox keeper Michael Ingham for the Hatters' goal after just five minutes.
Lanre Oyebanjo struck a post and Matty Blair went close for the visitors.
But Patrick McLaughlin's powerful drive levelled on 81 minutes, James Meredith nicking the points from close range.
The Hatters are now winless in five after their nine-game unbeaten home run came to an end.
The Minstermen, who ended Luton's play-off hopes two years ago and also overcame the Hatters in the FA Trophy semi-final earlier this month, looked out for the count.
But McLaughlin fired into the bottom corner from the edge of the box before Meredith bundled home his side's 86th minute winner after substitute Ashley Chambers' shot was parried by Luton goalkeeper Mark Tyler.
That stretched York's unbeaten away run in the league to 13 games, hoisting them up to fourth, now three points clear of sixth-placed Luton.
FROM THE DRESSING ROOM
York City manager Gary Mills told BBC Radio York:
"I thought it was as a great game. I thought we were excellent. We kept plugging away.
"I thought they played well as well, but to come away from home and play how we did tonight it's a fantastic away performance.
"We know it's always difficult coming here but I keep telling everybody with the set of players we've got, after the disappointment last Saturday, to go to Bath to go to Luton and pick up six points in the space of six days is a magnificent effort from everyone concerned."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +4:03
Inswinging corner taken right-footed by Robbie Willmott from the left by-line, clearance by James Meredith.90:00 +3:42
Free kick taken by Eugen Bopp.90:00 +3:42 Booking
Booking Jason Walker shown a yellow card.90:00 +3:28
Jake Howells challenges Jason Walker unfairly and gives away a free kick.90:00 +2:30 Substitution
Substitution Patrick McLaughlin goes off and Daniel Parslow comes on.90:00 +1:55
Adam Watkins produces a right-footed shot from the edge of the box and misses to the left of the target.89:41
Stuart Fleetwood fouled by Eugen Bopp, the ref awards a free kick. Direct free kick taken by Mark Tyler.85:40
The assist for the goal came from Ben Gibson.85:40 Goal scored
Goal! - James Meredith - Luton 1 - 2 York James Meredith scores a goal from inside the area low into the middle of the goal. Luton 1-2 York.85:01
Outswinging corner taken right-footed by Eugen Bopp from the right by-line, clearance by Keith Keane. Effort from 18 yards by Ben Gibson. Save made by Mark Tyler.84:34 Substitution
Substitution Adam Watkins is brought on as a substitute for Godfrey Poku.83:14
Michael Ingham takes the free kick.83:14 Booking
Booking Alex Lawless booked for unsporting behaviour.83:03
Foul by Alex Lawless on Eugen Bopp, free kick awarded.81:19
Godfrey Poku fouled by Eugen Bopp, the ref awards a free kick. Keith Keane delivers the ball from the free kick right-footed from right wing.80:16
Assist by Eugen Bopp.80:16 Goal scored
Goal! - Patrick McLaughlin - Luton 1 - 1 York Patrick McLaughlin scores a goal from just outside the penalty area to the bottom left corner of the goal. Luton 1-1 York.79:25
Free kick crossed by Eugen Bopp.79:25 Booking
Booking Jake Howells is cautioned by the ref for unsporting behaviour.
Jake Howells concedes a free kick for a foul on Jason Walker.78:31
Keith Keane concedes a free kick for a foul on Ben Gibson. Michael Ingham takes the free kick.76:47
Eugen Bopp takes the outswinging corner, Janos Kovacs makes a clearance.75:28
Lanre Oyebanjo has an effort at goal. Janos Kovacs gets a block in. Corner taken right-footed by Eugen Bopp.72:05 Substitution
Substitution Andre Gray goes off and Stuart Fleetwood comes on.71:22
Andre Gray is caught offside. Free kick taken by Michael Ingham.70:20
Godfrey Poku has a shot on goal from outside the area which misses left.68:42 Substitution
Substitution (York) makes a substitution, with Eugen Bopp coming on for Jon Challinor.67:42
Outswinging corner taken by Lanre Oyebanjo, clearance by Keith Keane.67:14
Outswinging corner taken by Lanre Oyebanjo, clearance by Curtis Osano.65:43
Andre Gray challenges James Meredith unfairly and gives away a free kick. Michael Ingham restarts play with the free kick.62:52
Free kick taken by Michael Ingham.62:52 Substitution
Substitution Ashley Chambers joins the action as a substitute, replacing Jamie Reed.62:52 Booking
Booking Booking for Godfrey Poku for unsporting behaviour.62:30
Unfair challenge on Chris Smith by Godfrey Poku results in a free kick.60:47
Corner from the right by-line taken by Lanre Oyebanjo, Jason Walker has a headed effort at goal from deep inside the area missing to the right of the goal.59:26
Shot by James Meredith from just outside the area goes over the net.57:01 Substitution
Substitution Craig McAllister replaces Danny Crow.55:40
Lanre Oyebanjo takes a outswinging corner from the right by-line to the near post, clearance made by Danny Crow.54:37
Corner taken by Lanre Oyebanjo, clearance by Curtis Osano.54:20
Patrick McLaughlin takes a shot from 12 yards. Save made by Mark Tyler.53:35
Free kick awarded for a foul by Alex Lawless on Matty Blair. Ben Gibson takes the free kick.52:33
Drilled left-footed shot by Andre Gray. Save made by Michael Ingham.47:34
The referee gives a free kick against Andre Gray for handball. Free kick taken by Chris Doig.45:01
The referee blows his whistle to start the second half.45:00 +2:12 Half time
Half Time The first half comes to an end.45:00 +1:41
Curtis Osano concedes a free kick for a foul on Chris Smith. Lanre Oyebanjo delivers the ball from the free kick right-footed from left wing, Janos Kovacs manages to make a clearance.41:06
Jon Challinor fouled by Danny Crow, the ref awards a free kick. Michael Ingham takes the free kick.39:38
Jon Challinor restarts play with the free kick.39:38 Booking
Booking The referee shows Robbie Willmott a yellow card for unsporting behaviour.39:24
Unfair challenge on Chris Smith by Robbie Willmott results in a free kick.34:40
Robbie Willmott gives away a free kick for an unfair challenge on Jon Challinor. Jon Challinor restarts play with the free kick.32:55
Corner taken right-footed by Robbie Willmott, save made by Michael Ingham.31:41
Lanre Oyebanjo has an effort at goal from just outside the area hitting the post.28:58
Jamie Reed takes the chance to get an effort at goal. Save by Mark Tyler.22:43
Curtis Osano has an effort at goal from just outside the box which goes wide of the right-hand post.21:43
Corner from the right by-line taken by Lanre Oyebanjo, clearance by Godfrey Poku.20:40
Keith Keane challenges Lanre Oyebanjo unfairly and gives away a free kick. Free kick taken by Jon Challinor.19:37
Robbie Willmott takes a corner.16:01
Robbie Willmott concedes a free kick for a foul on James Meredith. Michael Ingham restarts play with the free kick.11:26
Drilled right-footed shot by Andre Gray. Save by Michael Ingham.8:14
Inswinging corner taken by Robbie Willmott from the left by-line, save by Michael Ingham.6:02
James Meredith gives away a free kick for an unfair challenge on Jake Howells. Mark Tyler restarts play with the free kick.4:38 Goal scored
Goal! - Andre Gray - Luton 1 - 0 York Andre Gray fires in a goal from close range to the bottom left corner of the goal. Luton 1-0 York.2:14
Jamie Reed fouled by Alex Lawless, the ref awards a free kick. Direct free kick taken by Ben Gibson.0:00
The game begins.
Live data and text provided by our data suppliers