Match ends, Peterborough United 3, Lincoln City 3.
Peterborough sealed promotion to the Championship as Jonson Clarke-Harris' 96th-minute penalty saw them come from 3-0 down to draw with Lincoln.
Darren Ferguson's side needed to avoid defeat to go up but two Anthony Scully goals and a Jorge Grant penalty had third-placed Lincoln in control.
But a Siriki Dembele goal and Clarke-Harris' brace brought second-placed Posh level to get them over the line.
Hull's win means they are champions, with Peterborough runners-up.
Posh were on the receiving end of a comeback in midweek when they spurned a two-goal lead to draw with Doncaster, when victory would have secured their promotion.
Had Michael Appleton's Imps held on to victory they would have been five points behind their opponents with two games left, but League One player of the year Clarke-Harris saw a deflected free-kick go in to make it 3-2 before blasting home his last-gasp spot-kick after Sammie Szmodics was brought down in the box.
Instead Lincoln, who dropped a place to fourth after Sunderland's victory at Plymouth, will contest the League One play-offs as they try to join Peterborough in the second tier.
Posh stay strong at last
It has been a long road back to the Championship for Peterborough, who have taken eight seasons to return to the second tier after being relegated with a record 54 points in 2012-13.
Recent campaigns had followed a similar pattern - a fast start, plenty of hype and expectation, rumours of a key player leaving in January followed by a nosedive in form to see them fall agonisingly short of the top six.
Last season was particularly tough to take as Posh were sixth when League One was halted by coronavirus, only to miss out on a play-off spot on points per game.
Twenty-six goal striker Ivan Toney left for Brentford but the club had already signed a ready-made replacement in Clarke-Harris, with forward Szmodics' move from Bristol City also a coup.
Ferguson's side were top at the start of November but a run of five defeats in six - including an FA Cup first-round exit to non-league Chorley - had supporters worried that another mid-season collapse was happening.
There was the usual January saga as forward Dembele handed in a transfer request but he stayed and Posh strung together 10 wins in 14 league matches to put them back on top heading to March.
Last month's 7-0 demolition of Accrington was a reminder of how devastating they can be in attack and they managed to make the Weston Homes Stadium a fortress despite the pitch being dogged by drainage issues.
Former Coventry, Rotherham and Bristol City striker Clarke-Harris has passed 30 goals for the season and Ferguson - in his third spell as manager - has a fourth Peterborough promotion to his name.
'The best promotion I've ever had' - Reaction
Peterborough United manager Darren Ferguson told BBC Radio Cambridgeshire:
"I've never seen anything like it - it was incredible, absolutely incredible. To do that in a game of that magnitude is incredible.
"You're thinking at 3-0 down it could go to the last day - you're thinking all sorts in your mind - you're thinking we can't concede any more goals because of goal difference.
"But once we got the second goal I thought we'd go and win it, never mind draw.
"This football club means a lot to me - it's my fourth promotion now [at Peterborough] and this is the best one, the best promotion I've ever had, because of what it means.
"Now we're in the Championship we're going to try and stay there, and I think we will."
- 8TaylorBooked at 55minsSubstituted forHamiltonat 60'minutes
- 12BrownSubstituted forEisaat 90'minutes
- 9Clarke-HarrisBooked at 90mins
- 4MontsmaBooked at 90mins
- 26AndersonSubstituted forEdunat 87'minutes
- 23BridcuttBooked at 56minsSubstituted forMcGrandlesat 64'minutesBooked at 90mins
- 10GrantBooked at 90mins
- 9HopperSubstituted forMortonat 80'minutes
- John Busby
- Shots on Target
Conor McGrandles (Lincoln City) is shown the yellow card.
Jorge Grant (Lincoln City) is shown the yellow card.
Second Half ends, Peterborough United 3, Lincoln City 3.
Jonson Clarke-Harris (Peterborough United) is shown the yellow card for excessive celebration.
Goal! Peterborough United 3, Lincoln City 3. Jonson Clarke-Harris (Peterborough United) converts the penalty with a left footed shot to the bottom left corner.
Lewis Montsma (Lincoln City) is shown the yellow card.
Penalty Peterborough United. Sammie Szmodics draws a foul in the penalty area.
Penalty conceded by Anthony Scully (Lincoln City) after a foul in the penalty area.
Joe Ward (Peterborough United) wins a free kick in the defensive half.
Foul by Morgan Rogers (Lincoln City).
Foul by Jonson Clarke-Harris (Peterborough United).
Conor McGrandles (Lincoln City) wins a free kick on the right wing.
Corner, Peterborough United. Conceded by Timothy Eyoma.
Substitution, Peterborough United. Mohamed Eisa replaces Reece Brown.
Attempt missed. Frankie Kent (Peterborough United) header from very close range is close, but misses to the right. Assisted by Joe Ward with a cross following a corner.
Corner, Peterborough United. Conceded by Tayo Edun.
Substitution, Lincoln City. Tayo Edun replaces Harry Anderson.
Foul by Ethan Hamilton (Peterborough United).
Conor McGrandles (Lincoln City) wins a free kick in the defensive half.