From Brentford Community Stadium - Leeds United secured their Premier League safety on the final day of the season with a 2-1 win at nine-man Brentford.
Burnley's defeat at home to Newcastle opened the door for Leeds to leapfrog them in the table after going into the last weekend of the campaign level on points.
Leeds' nerves were jangling from the off as Diego Llorente nearly gifted Ivan Toney a route to goal with just five seconds (yes, five seconds, not minutes) on the clock, but he recovered in time to deny the striker a clear path.
After a jangly opening 17 minutes, Sam Greenwood carved out half a chance for the visitors, but his strike from 20 yards sailed harmlessly over the top of David Raya's goal.
Joe Gelhardt had the ball in the net moments later to send the travelling fans, who had just learned that Burnley had conceded a penalty, into delirium. However, a quick VAR check showed he was offside when slipped through by Jack Harrison.
Brentford were struggling to get out of their own half but did cause Leeds some trouble when Bryan Mbeumo nutmegged Junior Firpo and picked out Mathias Jensen with a cutback, but Illan Meslier chipped his instinctive dink over.
The Bees should have taken the lead when Liam Cooper gifted possession to Jensen, who this time turned provider for Mbeumo, but the Frenchman dragged his shot wide of Meslier's goal.
Just after the break, Mbeumo once again scuffed a one-on-one with Meslier, curling a tame shot straight into his countryman's arms.
At the other end, Rodrigo spurned a great chance to notch Leeds ahead after he was picked out by Raphinha, but Raya was quick off his line and smothered his shot.
But Raya went from hero to zero when he skewed a clearance and brought down Raphinha, handing Leeds a penalty. The Brazilian stepped up to take the spot kick and found the top corner nonchalantly.
Brentford were reduced to ten men in the final 15 minutes after Kristoffer Ajer was forced off with injury and they had already used three substitutes.
But that didn't stop them from finding an equaliser when Wissa picked out Sergi Canos with a fabulous cross, and after ghosting in behind Robin Koch, guided a header into the far corner.
However, Canos picked up two yellow cards in quick succession - first for his celebration and then a cynical foul - and was dismissed, leaving the hosts to finish the game with nine men.
And Leeds found the very late winner they craved when Jack Harrison lashed in an effort from 25 yards after Brentford failed to deal with a corner, securing their Premier League status for next season with the final kick of this one.
Brentford vs Leeds United player ratings
1. Brentford (4-3-3)
GK: David Raya - 4/10 - Made a few decent saves but then uncharacteristically handed Leeds a penalty.
RB: Kristoffer Ajer - 5/10 - Hard to tell if the 6'5 centre-back playing out of position is clumsy or if his appearance gives him that unfair appearance. Troubled by Harrison now and then but not too often.
CB: Pontus Jansson - 6/10 - Brentford's best defender on the day against his former side.
CB: Mads Bech Sorensen - 3/10 - Looked nervy in possession and constantly misjudged the flight of the ball.
LB: Rico Henry - 5/10 - Not his best game but definitely not his worst. A few Brentford fans questioned why he was substituted.
DM: Vitaly Janelt - 5/10 - A fine player but he doesn't have the same presence as Christian Norgaard in midfield.
CM: Mathias Jensen - 5/10 - Struggled initially to cope with Leeds' intensity but grew into the game.
CM: Christian Eriksen - 7/10 - Pinged a series of perfectly-weighted passes across the pitch in what could have been his final game for Brentford.
RF: Bryan Mbeumo - 4/10 - Created a lot of havoc but unfortunately he got too caught up in his own chaos and missed a host of opportunities.
CF: Ivan Toney - 5/10 - Made life tough for Cooper and Llorente but not enough in dangerous areas.
LF: Yoane Wissa - 5/10 - Similarly looked threatening in patches yet scarcely high up the pitch.
SUB: Josh Dasilva (CM, 58' for Jensen) - 5/10 - Didn't add much to the midfield battle.
SUB: Sergi Canos (LB, 63' for Henry) - 6/10 - Came on. Scored. Got sent off. Probably won't have needed a shower.
SUB: Shandon Baptiste (CM, 70' for Sorensen) - 5/10
2. Leeds United (4-2-3-1)
GK: Illan Meslier - 7/10 - Often at fault for conceding goals, Meslier stood tall today and stepped up when it mattered.
RB: Robin Koch - 5/10 - Contrastingly to Ajer looked comfortable at right-back for the most part. Left Canos alone for Brentford's equaliser but he was so far out he wouldn't have thought to get any tighter.
CB: Liam Cooper - 4/10 - Given the runaround for much of the afternoon and was fortunate
CB: Diego Llorente - 5/10 - Recovered well from his early clanger in that he only let Toney get the better of him outside the box.
LB: Junior Firpo - 6/10 - Drove forward down the left with real energy.
CM: Kalvin Phillips - 9/10 - Wow. A reminder that if Phillips had been fit all season Leeds wouldn't have been in this situation. Won the ball back and redistributed it perfectly.
CM: Sam Greenwood - 7/10 - While usually a forward, Greenwood went toe to toe with Brentford's experienced midfielders and excelled.
RM: Raphinha - 7/10 - His threat wasn't always consistent but he was menacing nevertheless. Won and scored a crucial penalty.
AM: Rodrigo - 6/10 - Popped up in areas which troubled Brentford when trying to play from the back.
LM: Jack Harrison - 8/10 - Had some joy darting down the left wing but tended to split his duels with Ajer. Scored a huge goal in Leeds' history at the death.
CF: Joe Gelhardt - 6/10 - Wasn't always able to hold the ball up but was lively in the channels.
SUB: Pascal Struijk (CB, 70' for Gelhardt) - 6/10
SUB: Mateusz Klich (CM, 85' for Greenwood) - N/A