Huddersfield 0 - 3 Peterborough
Peterborough hit three late goals to beat Huddersfield at Old Trafford and win promotion back to the Championship at the first time of asking.
The League One play-off final looked to be heading for extra time before Posh hit three goals in seven minutes.
Tommy Rowe headed them ahead from Grant McCann's free-kick before top scorer Craig Mackail-Smith's shot deflected in off Antony Kay's knee.
McCann curled in a free-kick to inflict Town's first league defeat of 2011.
For Huddersfield, who had not lost in 27 league and play-off games, the scoreline was wildly unfair.
But, for Posh boss Darren Ferguson, back on the ground where he started his own career, victory proved a happy end to a mixed weekend for his family, his father's Manchester United having lost to Barcelona in Saturday's Champions League final .
To add to Ferguson Jnr's sense of achievement, Posh have effectively swapped leagues with Preston North End, who sacked him in December .
Peterborough, who have now been promoted in all the three play-off campaigns they have participated in, were the better side in the first half.
They almost took the lead within five minutes, only for Mackail-Smith's shot to be deflected onto the outside of the post by a last-gasp tackle from Kay.
George Boyd then showed good trickery in forcing an Ian Bennett save from 30 yards out as Posh, relegated from the Championship a year ago, threatened to run riot.
Huddersfield looked like their chances would be more likely to come from set-pieces and crosses, and Lee Peltier headed over from Gary Roberts' ball.
Posh keeper Paul Jones then plucked Peter Clarke's goalbound header out of the air.
Huddersfield boss Lee Clark had decided to play Benik Afobe as his only out-and-out striker, his usual policy for away games.
But, when the on-loan Arsenal youngster received the ball in the box, he failed to control it and the chance was gone.
Mackail-Smith was then put through, denied by another brilliant last-ditch Kay tackle.
And, from another Terriers cross, Afobe took the ball off Daniel Ward's foot when he was ready to shoot from inside the box.
The game was going from end to end and Boyd put Mackail-Smith through, but he was denied by yet another fine saving tackle, denying him the chance to shoot.
Roberts saw his free-kick tipped wide by Jones and then his corner found Afobe, who turned in the box but fired wide from eight yards out.
And, with the final chance of the first half, Mackail-Smith fired wide unmarked in the box after Boyd poked him through.
In the first major incident of the second half, McCann hit a curling free-kick from 20 yards out just over.
Then came Huddersfield's big chance, Ward running down the right wing, cutting inside and smashing the ball against the bar.
The Terriers were growing in confidence, causing Posh plenty of problems from crosses. But they could have been down to 10 men, when Kay brought down the effervescent Mackail-Smith, who was through on goal.
He was saved by the fact that defensive partner Clarke was still in with a chance of catching him and was only shown a yellow card.
Posh's 48 league and play-off games this season had seen 189 goals and, until the 78th minute, it looked like this game would be letting that record down.
But after all Huddersfield's pressure, Posh broke the deadlock, Rowe's header finding the centre of the goal from McCann's whipped free-kick.
Clark decided to go to two up front and brought on Danny Cadamarteri. But the momentum was all Peterborough's by now, Mackail-Smith's shot hitting Kay before finding the corner of the net.
Mackail-Smith's strike, his 35th of the season and 99th for the club, is likely to be his last , the Scotland international having been targeted by Premier League-bound QPR and Norwich amongst others.
McCann, whose set-pieces had caused problems for the Terriers, then put an unreflective gloss on the scoreline from 25 yards out. And Lee Tomlin fired over late on from Boyd's pass as Posh threatened to add a fourth.
But the final whistle ended the heartbreak for Huddersfield, who, having finished third in the league, eight points clear of Posh, had been in the chase for automatic promotion until the penultimate day of the league campaign.
Live Text Commentary
Full Time The referee blows for the end of the match.90:00 +2:23
Free kick awarded for a foul by Mark Little on Alan Lee. Direct free kick taken by Gary Naysmith.90:00 +1:15 Substitution
Substitution David Ball on for Lee Tomlin.90:00 +0:02
Jack Hunt sends in a cross.88:24
Lee Tomlin takes a shot from just inside the penalty box which clears the crossbar.87:45
Chris Whelpdale is caught offside. Ian Bennett takes the free kick.86:48
George Boyd decides to take a short corner.84:32 Goal scored
Goal! - Grant McCann - Huddersfld 0 - 3 Peterboro Grant McCann hits the back of the net with a goal direct from the free kick from outside the area to the top right corner of the goal. Huddersfield 0-3 Peterborough.83:01 Substitution
Substitution Chris Whelpdale comes on in place of Tommy Rowe.83:01
Peter Clarke concedes a free kick for a foul on Craig Mackail-Smith.82:05
Jordan Rhodes challenges Gabriel Zakuani unfairly and gives away a free kick. Direct free kick taken by Paul Jones.80:04 Substitution
Substitution Jordan Rhodes comes on in place of Benik Afobe.80:04 Substitution
Substitution Scott Arfield leaves the field to be replaced by Alan Lee.79:09
Assist by George Boyd.79:09 Goal scored
Goal! - Craig Mackail-Smith - Huddersfld 0 - 2 Peterboro Craig Mackail-Smith finds the back of the net with a goal from the edge of the penalty box to the bottom right corner of the goal. Huddersfield 0-2 Peterborough.78:35 Substitution
Substitution Danny Cadamarteri is brought on as a substitute for Daniel Ward.77:42
Assist on the goal came from Grant McCann.77:42 Goal scored
Goal! - Tommy Rowe - Huddersfld 0 - 1 Peterboro Tommy Rowe finds the back of the net with a headed goal from inside the six-yard box. Huddersfield 0-1 Peterborough.76:44
George Boyd fouled by Gary Naysmith, the ref awards a free kick. The ball is swung over by Grant McCann,75:03
Shot on goal comes in from Lee Tomlin from the free kick, blocked by Scott Arfield.
Booking The referee books Antony Kay for unsporting behaviour.74:40
Craig Mackail-Smith fouled by Antony Kay, the ref awards a free kick.72:28
Grant McCann takes a corner.72:07
The referee penalises Benik Afobe for handball. Gabriel Zakuani restarts play with the free kick.71:35
Mark Little fouled by Gary Roberts, the ref awards a free kick. Ryan Bennett restarts play with the free kick.71:02
Scott Arfield is adjudged to have handled the ball. Paul Jones takes the free kick.70:09
Foul by Scott Arfield on Grant McCann, free kick awarded. Direct free kick taken by Grant McCann. Scott Arfield fouled by George Boyd, the ref awards a free kick. Strike comes in from Gary Roberts from the free kick.68:45
Corner taken left-footed by Gary Roberts, save by Paul Jones.64:50
Ian Bennett takes the direct free kick.64:50 Booking
Booking The referee shows Charlie Lee a yellow card.64:45
Foul by Charlie Lee on Lee Peltier, free kick awarded.63:03 Substitution
Substitution Charlie Lee is brought on as a substitute for Grant Basey.58:34
Shot from deep inside the area by Daniel Ward clears the crossbar.56:05
Unfair challenge on James Wesolowski by Benik Afobe results in a free kick. Ryan Bennett restarts play with the free kick.55:25
Gary Roberts gives away a free kick for an unfair challenge on Grant Basey. Paul Jones restarts play with the free kick.53:48
Effort from outside the penalty box by Daniel Ward goes wide left of the target.49:14
Gary Roberts challenges George Boyd unfairly and gives away a free kick. Grant McCann has an effort direct from the free kick.48:34
The offside flag is raised against Benik Afobe. Indirect free kick taken by Paul Jones.45:01
The second half has started.45:00 +3:58 Half time
Half Time The match has reached half-time.45:00 +3:03
Close range effort by Craig Mackail-Smith goes wide of the right-hand upright.45:00 +0:07
Outswinging corner taken by Gary Roberts from the left by-line played to the near post, Close range effort by Benik Afobe goes wide of the right-hand upright.44:40
Corner taken left-footed by Gary Roberts from the left by-line to the near post, Grant Basey makes a clearance.43:37
Free kick awarded for a foul by George Boyd on Lee Peltier. Gary Roberts produces a shot on goal direct from the free kick, save by Paul Jones.42:30
Free kick awarded for a foul by Tommy Rowe on Peter Clarke. Antony Kay restarts play with the free kick.41:01
Free kick awarded for an unfair challenge on Scott Arfield by Grant McCann. Direct free kick taken by Ian Bennett.38:53 Booking
Booking Jack Hunt booked for unsporting behaviour.33:40
Direct free kick taken by Paul Jones.33:40 Booking
Booking Lee Peltier is cautioned by the ref for unsporting behaviour.33:32
James Wesolowski fouled by Lee Peltier, the ref awards a free kick.32:17
Foul by Scott Arfield on Grant McCann, free kick awarded. Direct free kick taken by Grant McCann.31:55
The offside flag is raised against Tommy Rowe. Peter Clarke takes the free kick.31:31
Inswinging corner taken left-footed by Grant McCann from the right by-line, Peter Clarke makes a clearance.29:28
Free kick awarded for an unfair challenge on Tommy Rowe by Daniel Ward. Paul Jones restarts play with the free kick.28:31
Jack Hunt restarts play with the free kick.28:31 Booking
Booking Lee Tomlin is cautioned.28:25
Free kick awarded for an unfair challenge on Jack Hunt by Lee Tomlin.24:35
The assistant referee signals for offside against Benik Afobe. Paul Jones takes the free kick.21:30
Free kick awarded for a foul by James Wesolowski on Kevin Kilbane. Peter Clarke restarts play with the free kick.20:10
Grant Basey concedes a free kick for a foul on Daniel Ward. Direct free kick taken by Jack Hunt.18:28
Peter Clarke takes a shot. Save by Paul Jones.14:08
George Boyd gives away a free kick for an unfair challenge on Lee Peltier. Free kick taken by Antony Kay.10:39
Outswinging corner taken left-footed by Gary Roberts played to the near post, Headed effort from deep inside the penalty area by Lee Peltier misses to the left of the goal.9:58
Gary Roberts takes a inswinging corner to the near post, clearance by Grant McCann.7:03
George Boyd takes a shot. Save by Ian Bennett.5:38
Kevin Kilbane concedes a free kick for a foul on Mark Little. Grant McCann delivers the ball from the free kick left-footed from right wing, Benik Afobe manages to make a clearance.4:34
Inswinging corner taken left-footed by Grant McCann from the right by-line, clearance by Gary Naysmith.4:16
Shot by Craig Mackail-Smith from deep inside the penalty area hits the post.0:00
The referee gets the game underway.
Live data and text provided by our data suppliers