York City secured their return to the Football League after an eight-year absence as they came from behind to beat Luton Town at Wembley.
In a pulsating Blue Square Bet Premier play-off final, Andre Gray fired in Robbie Willmott's cross from inside the box to put the Hatters ahead.
But Ashley Chambers's low shot past Mark Tyler was a deserved equaliser.
Matty Blair fired in from close range, despite being in an offside position, to secure promotion for York.
It completed a Wembley double for York, who won the FA Trophy last weekend.
Matty Blair - a man for the big occasion
- FA Trophy semi-final versus Luton on 17 March - last-minute winner
- Play-off semi-final versus Mansfield on 7 May - extra-time winner
- FA Trophy final versus Newport on 12 May - scored opener in 2-0 win
- Play-off final on 20 May versus Luton - scored winner
The defeat leaves Luton to play non-league football for a fourth consecutive season.
York's victory not only left Luton, whose fans made up a significant majority of the 39,265 Wembley crowd, devastated, but also ensured the Minstermen have won all three of their Blue Square Bet Premier matches against the Hatters this season.
Luton struck the first blow of a frenetic opening half when Willmott found Gray with a low cross and the forward fired the ball into the bottom corner of Michael Ingham's net.
But York responded immediately and pegged back the Hatters before Alex Lawless struck wide from distance at the other end.
Willmott also had an attempt go off-target before former Luton striker Jason Walker's cross found Lanre Oyebanjo, who fired wide from inside the area.
Lawless then blocked Jon Challinor's shot from the edge of the area as the opening half continued at a high tempo and Mark Tyler then tipped Walker's looping header over the bar before Gray had an attempt on goal for Luton deflected wide.
Chambers deservedly levelled for York when he fired skipper Chris Smith's hooked cross into the net from inside the box, after the Hatters defence failed to clear Oyebanjo's free-kick.
The second half resumed in an almost mirror image as York went ahead inside two minutes when Blair, who appeared to be a yard offside, latched on to Daniel Parslow's header from Walker's cross and fired in from close range.
James Meredith went close to extending York's lead, heading just over from substitute Scott Brown's corner when free in the area before Chambers saw a shot well saved by Mark Tyler.
Luton's recent woe
- 2006-07 - Relegated from Championship
- 2007-08 - Relegated from League One
- 2008-09 - Relegated from League Two
- 2009-10 - Beaten in play-off semi-final by York
- 2010-11 - Beaten in play-off final by AFC Wimbledon
- 2011-12 - Beaten in play-off final by York
Subsitute John Paul Kissock then forced a save from City keeper Ingham before Oyebanjo prevented him and fellow substitute Craig McAllister from finding the net and Gray should have scored soon after, but was unable to connect with the ball when six yards out with the goal at his mercy.
Luton's task was made even harder when McAllister, who had come on in the second half for top scorer Stuart Fleetwood, had to be replaced by Aaron O'Connor after suffering a facial injury.
But the Hatters, who lost on penalties to AFC Wimbledon in last season's play-off final, continued to press for an equaliser as Curtis Osano's looping ball towards goal was tipped away by the impressive Ingham.
And, after O'Connor desperately attempted to level with a shot on the turn, York's return to the Football League for the first time since 2004 was sealed.
VIEW FROM THE DRESSING ROOM
York City forward Matty Blair told BBC Sport:
"It feels amazing [to be playing in the Football League next season] but it hasn't really sunk in yet.
"It'll properly sink in later tonight or tomorrow when we will be celebrating it again but at the moment I'm a bit tired but I'm the happiest man ever.
"I scored the goal and it feels unbelievable but I'm not taking anything away from the other lads today. The back five, and Daniel Parslow in front, defended like heroes and were brilliant all game.
"We were under the cosh a bit last half an hour and they just stood tall and went 'right you're not getting past us'. Luton were always going to put us under pressure after we scored but we stood tall."
- 01 Tyler
- 06 Pilkington
- 15 Howells
- 18 Osano
- 34 Kovacs
- 04 Keane
- 07 Lawless Booked
- 11 Willmott
- 28 Watkins (Kissock - 61' )
- 13 Fleetwood (McAllister - 61' )
- 27 Gray
- 02 Gleeson
- 12 Blackett
- 20 Kissock
- 09 McAllister (O'Connor - 73' )
- 14 O'Connor
- 24 Ingham
- 02 Oyebanjo
- 03 Meredith
- 04 Smith
- 06 Parslow
- 23 Doig
- 27 Gibson Booked
- 17 Blair
- 20 Challinor (Brown - 37' )
- 09 Walker (McLaughlin - 85' )
- 10 Chambers (Reed - 78' )
- 01 Musselwhite
- 18 Moke
- 19 Brown
- 26 McLaughlin
- 07 Reed
Live Text Commentary
Full Time The referee brings the game to a close.90:00 +4:06
Keith Keane challenges Jamie Reed unfairly and gives away a free kick. Scott Brown takes the direct free kick.90:00 +3:33
Keith Keane has an effort at goal from a long way out that goes wide left.90:00 +1:40
Matty Blair decides to take a short corner.90:00 +0:55
Effort on goal by Aaron O'Connor from outside the area goes harmlessly over the bar.90:00
Effort on goal by Robbie Willmott from outside the box goes harmlessly over the bar.86:11
Alex Lawless restarts play with the free kick.86:11 Booking
Booking Ben Gibson receives a yellow card for unsporting behaviour.85:57
Free kick awarded for an unfair challenge on Robbie Willmott by Ben Gibson.84:38 Substitution
Substitution Patrick McLaughlin replaces Jason Walker.83:24
The ball is sent over by Curtis Osano, Andre Gray takes a shot. Save by Michael Ingham. Outswinging corner taken from the left by-line by Jake Howells, save by Michael Ingham.81:49
Free kick awarded for a foul by Curtis Osano on Jason Walker. Jason Walker produces a strike on goal direct from the free kick.80:06
John Kissock takes a shot. Blocked by Lanre Oyebanjo.79:51
The ball is crossed by Curtis Osano, save made by Michael Ingham.78:21
Effort from the edge of the area by Jake Howells goes wide of the left-hand upright.77:15 Substitution
Substitution Jamie Reed comes on in place of Ashley Chambers.76:39
Effort on goal by John Kissock from 25 yards. Matty Blair gets a block in.72:02
Direct free kick taken by Robbie Willmott.72:02 Substitution
Substitution Craig McAllister goes off and Aaron O'Connor comes on.72:02
Foul by James Meredith on George Pilkington, free kick awarded.
Inswinging corner taken from the left by-line by Robbie Willmott.68:28
Curtis Osano produces a cross, clearance by Chris Smith.67:04
John Kissock takes a shot. Save by Michael Ingham.66:09
Ashley Chambers takes a shot. Save made by Mark Tyler.61:42
Ben Gibson restarts play with the free kick.61:42 Booking
Booking Alex Lawless receives a yellow card for unsporting behaviour.61:18
Unfair challenge on Jason Walker by Alex Lawless results in a free kick.60:01 Substitution
Substitution Craig McAllister is brought on as a substitute for Stuart Fleetwood.60:01 Substitution
Substitution John Kissock is brought on as a substitute for Adam Watkins.58:17
Jake Howells has an effort at goal. Save made by Michael Ingham.57:22
The ball is swung over by Matty Blair, Ashley Chambers takes a shot. Save by Mark Tyler.56:48
James Meredith produces a header from deep inside the six-yard box that clears the crossbar.56:10
Inswinging corner taken by Scott Brown.55:00
Robbie Willmott gives away a free kick for an unfair challenge on Chris Smith. Direct free kick taken by Lanre Oyebanjo.51:34
Drilled right-footed shot by Robbie Willmott. Lanre Oyebanjo gets a block in.51:08
Corner taken short by Robbie Willmott.49:35
The ball is delivered by Robbie Willmott, Chris Smith makes a clearance.48:14
Ashley Chambers is ruled offside. Mark Tyler takes the free kick.46:09
Jason Walker provided the assist for the goal.46:09 Goal scored
Goal! - Matty Blair - Luton 1 - 2 York A goal is scored by Matty Blair from close range low into the middle of the goal. Luton 1-2 York.45:01
The referee starts the second half.45:00 +1:58 Half time
Half Time The half-time whistle blows.45:00 +1:15
Stuart Fleetwood takes a shot. Comfortable save by Michael Ingham.45:00 +0:31
Alex Lawless takes a shot. Save by Michael Ingham.40:01
Outswinging corner taken from the right by-line by Stuart Fleetwood, save by Michael Ingham.39:44
Andre Gray takes the chance to get an effort at goal. Save by Michael Ingham.38:47
Stuart Fleetwood delivers the ball, clearance by Lanre Oyebanjo.36:26 Substitution
Substitution Scott Brown joins the action as a substitute, replacing Jon Challinor.35:28
Drilled left-footed shot by Andre Gray. Michael Ingham makes a comfortable save.33:00
Jake Howells produces a left-footed shot from just outside the box that misses to the right of the target.32:20
Corner taken right-footed by Robbie Willmott, brilliant save by Michael Ingham.28:09
Curtis Osano fouled by Jason Walker, the ref awards a free kick. Free kick taken by Mark Tyler.27:36
Free kick awarded for a foul by Jake Howells on Matty Blair. Jon Challinor takes the free kick.25:51
Assist by Chris Smith.25:51 Goal scored
Goal! - Ashley Chambers - Luton 1 - 1 York A goal is scored by Ashley Chambers from deep inside the penalty area to the top right corner of the goal. Luton 1-1 York.24:17
Jon Challinor fouled by George Pilkington, the ref awards a free kick. Direct free kick taken by Lanre Oyebanjo.23:22
Stuart Fleetwood takes a shot from just outside the penalty area clears the crossbar.22:53
Corner taken right-footed by Robbie Willmott from the left by-line, Jon Challinor manages to make a clearance.22:42
Andre Gray takes a shot. Blocked by Chris Smith.20:01
Ashley Chambers sends in a cross, Janos Kovacs manages to make a clearance.19:41
Unfair challenge on James Meredith by Adam Watkins results in a free kick. Chris Smith takes the direct free kick.18:48
Inswinging corner taken right-footed by Lanre Oyebanjo from the left by-line, George Pilkington manages to make a clearance.18:11
Jason Walker takes a shot. Keith Keane gets a block in.16:48
Andre Gray is flagged offside by the assistant referee. Free kick taken by Jon Challinor.15:23
Corner taken by Lanre Oyebanjo from the left by-line, clearance made by George Pilkington.15:11
Jon Challinor sends in a cross, Jason Walker takes a shot. Save by Mark Tyler.12:27
Corner taken right-footed by Lanre Oyebanjo, clearance made by George Pilkington.11:29
Foul by Keith Keane on James Meredith, free kick awarded. Lanre Oyebanjo takes the direct free kick. Effort from 12 yards by Jon Challinor. George Pilkington gets a block in.9:30
A cross is delivered by Jason Walker, Ashley Chambers produces a left-footed shot from close in which goes wide of the left-hand upright.8:14
Robbie Willmott has an effort at goal from outside the penalty box missing to the wide right of the goal.7:29
Effort from 25 yards by Adam Watkins. Save by Michael Ingham.6:42
Jason Walker is flagged offside by the assistant referee. Mark Tyler restarts play with the free kick.6:16
Long range shot from Alex Lawless misses to the left of the target.2:47
Lanre Oyebanjo takes a outswinging corner to the near post.2:20
Free kick awarded for an unfair challenge on Jon Challinor by Robbie Willmott. Jon Challinor takes the direct free kick.1:14
The assist for the goal came from Robbie Willmott.1:14 Goal scored
Goal! - Andre Gray - Luton 1 - 0 York Andre Gray gets on the score sheet with a goal from deep inside the penalty box to the bottom right corner of the goal. Luton 1-0 York.1:12
Robbie Willmott crosses the ball,0:46
The ball is sent over by George Pilkington, clearance by Chris Smith.0:00
The match gets underway.
Live data and text provided by our data suppliers