Brentford 0-1 Doncaster
Doncaster Rovers clinched the League One title thanks to James Coppinger's injury-time winner in an incredible finale to the promotion showdown with Brentford at Griffin Park.
Rovers needed a draw to net the second automatic place and deny the Bees.
They looked set do so until Dean Furman fouled Toumani Diagouraga in the box in the 94th minute.
But Marcello Trotta hit the bar with his penalty and Coppinger scored on the break to give Rovers the title.
Bournemouth would have gone up as champions but instead dropped to second place following their draw away against Tranmere Rovers and Coppinger's counter-attack goal.
The visitors poured forward after substitute Trotta had blasted his spot-kick against the bar and Billy Paynter ran free on the right flank and showed great composure to tee up Coppinger.
Doncaster's gameplan of defending in numbers and frustrating their opponents had worked wonders until an astonishing last few minutes.
The Bees did go close to taking the lead when Bradley-Wright Phillips smashed a shot against the post early on but they threatened in a first half which lacked clearcut chances.
Doncaster's best opportunities saw David Cotterill twice denied from distance by goalkeeper Simon Moore.
And although the hosts looked more likely to break the deadlock after the interval, the visiting rearguard remained resolute and restricted their hosts.
Bees defender Harlee Dean twice wasted headed opportunities while Joanathan Douglas shot wildly over the bar from 15 yards.
But the Londoners seemed to have been gifted victory and Championship football next season when Furman fouled Diagouraga.
However on-loan Fulham striker Trotta insisted on taking the spot-kick away from captain Kevin O'Connor and smashed the ball against the bar.
Doncaster cleared their lines and Paynter ran through and slipped the ball into the path of Coppinger, who tapped home to consign the Bees to a two-legged play-off match against Swindon Town.
VIEWS FROM THE DRESSING ROOM
Brentford boss Uwe Rosler told BBC London 94.9:
"It's hard to put into words.
"The whole group had to respond because the whole group knew who I selected to take the penalty - which was Kevin O'Connor. As a whole group we have to make sure that message will be followed.
"We should go home and get it out of the system and from tomorrow we start again and then we will be okay. But at the moment it's very difficult under the circumstances after we didn't go up.
"We were nervous and some players didn't want the ball. We should have shown more bravery as a team to get the ball down."
Doncaster boss Brian Flynn told BBC Radio Sheffield:
"So close wasn't it? All credit to the lads, it was a monumental effort and Brentford are a good side. They really, really tested us to the limit.
"You get a penalty and you fear for the worst but thankfully it turned out brilliant.
"It was a beautiful game this and crazy at times."