Leeds United secured their Premier League status for the 2022/2023 season with a 2-1 win away at Brentford on Sunday afternoon.
The Whites' poorer goal difference meant they had to do better than Burnley in the last game of the season, with the two teams tied on points.
As the Clarets trailed against Newcastle, Raphinha put United ahead from the spot after Brentford 'keeper David Raya brought him down in the box.
Newcastle doubled their lead against Burnley but the Whites' relegation rivals, not giving up, clawed one back before Bees winger Sergi Canos agonisingly equalised for the hosts at the Brentford Community Stadium.
There was a further twist as the hosts' goalscorer was dismissed on a second yellow, leaving Brentford with just nine men after an injury to Kristoffer Ajer left them short, having used all their substitutions.
Just a Burnley equaliser away from relegation, United pushed hard to find a winner against a weakened side and it was Jack Harrison who came to the rescue in the fourth minute of injury time. The travelling support went wild as his deflected strike hit the back of the net to seal Leeds' survival.
Jesse Marsch backed by Andrea Radrizzani
Leeds United chairman Andrea Radrizzani said that Whites boss Jesse Marsch will remain at Elland Road to prepare for the 2022/2023 season.
The American was drafted in following the sacking of Marcelo Bielsa in February with the explicit aim of steering United clear of relegation to the Championship.
Radrizzani is satisfied that he has fulfilled his goal, and is looking ahead to a brighter future with Marsch at the helm.
"Staying in the Premier League was our objective this year and we’ve managed to obtain our top-flight status, but this is not success and improvements are needed," Radrizzani said in a club statement.
"As a board we will work hard with Jesse Marsch this summer to improve the squad and find a way to deliver the kind of performances you all deserve.
"We believe that with time and a full pre-season, Jesse will be the man to take this club forward."
Liam Cooper lifts lid on tough season
Leeds United captain revealed the personal impact of the Whites' difficult season after victory at Brentford averted the unwanted conclusion which looked, at times, inevitable.
The Whites skipper, who has been a Leeds supporter since childhood, suffered a hamstring injury which meant he spent three months sidelined midway through the season and could only watch on in agony as his side failed to climb clear of the bottom of the Premier League table.
The experience took a toll on the centre-back, but Cooper says Leeds got what they deserved in the end.
"I think I need to apologise to my missus and my kids," Cooper said.
"Over the last six weeks, they've been walking on eggshells around me.
"It's been stressful, I'm not going to lie. It's been difficult times.
"But we come in every day, we work hard and if you do work hard and you keep knocking on the door then eventually things pay off and we're absolutely delighted to be playing Premier League football again and that's for the fans."