Manchester United will need to win the FA Cup to qualify for Europe after they finished eighth in the Premier League despite winning 2-0 at Brighton on the final day.
Diogo Dalot scored against the run of play and substitute Rasmus Hojlund added a late clincher to give United consecutive wins to end their top-flight campaign before they face rivals Manchester City at Wembley.
But the Red Devils had to better Newcastle's result on Sunday to finish seventh and Eddie Howe's men won an entertaining match 4-2 against Brentford.
Joao Pedro twice came close to scoring for Brighton, who had most of the better chances, but defeat in Roberto De Zerbi's final game left the hosts 11th in the table, pipped to a top-half finish by Crystal Palace.
Brighton were more threatening in the early stages and they should have been ahead when Carlos Baleba found Valentin Barco in a dangerous position in the box. The Argentine easily got past Aaron Wan-Bissaka as he drove towards goal, but sent his shot too close to Andre Onana, with the United keeper making a key save.
Adam Webster was posing a regular aerial threat, heading two chances wide and then seeing a more threatening goal-bound effort blocked by Lisandro Martinez, making his first start since early February for United.
The visitors' only big chance of the first half came from a swift counterattack as Bruno Fernandes found Scott McTominay in a promising position, but the Scotland midfielder could only blaze over after taking a heavy first touch.
At other end, Joao Pedro powered past Diogo Dalot in the United box, only to drag his shot wide when he seemed destined to score, leaving fans at the Amex Stadium wondering how the half had ended goalless.
There were similar feelings after the break when Casemiro somehow cleared off the line from Joao Pedro after the striker had been found by Jakub Moder and beaten Onana with his close-range attempt.
But it was United who made the decisive breakthrough 17 minutes from time, as Casemiro's long ball caught out the home defence and full-back Dalot, who had found himself in an advanced position, raced through to score with a powerful finish.
Hojlund made sure of the points after 88 minutes. The Brighton defence backed away from him as he made a purposeful run into the box after exchanging passes with Christian Eriksen and the Denmark forward then found the net with a crisp right-footed finish.
De Zerbi leaves Brighton with a defeat
This was the last match for De Zerbi as Brighton manager after his departure was confirmed in the lead up to the game earlier this week.
De Zerbi led Brighton to a brilliant sixth-place finish in his first season, and while his second campaign ultimately did not match those heights, narrowly missing out on a top-10 spot and securing a last-16 berth in the Europa League still represents a creditable outcome.
There will, however, be frustration that Brighton did not secure a winning send-off, with United's late goals coming somewhat out of the blue, with the hosts always looking the more likely team to strike first and racking up 17 total attempts, although only three were on target.
As well as saying goodbye to De Zerbi, there was also a huge reception given to Adam Lallana when he was substituted early in the second half. The midfielder was emotional as he left the field after spending four seasons at the Amex.
Brighton had won their last four Premier League games against United – but ultimately fell short of becoming the first team to beat the Red Devils in five consecutive league games since Norwich City achieved the feat between 1988 and 1990.
United need cup glory after lowest Premier League finish
While wins over Newcastle and Brighton saw Man Utd finish the season reasonably strongly, eighth place still represents their lowest final position in the Premier League.
If they defeat Man City in the FA Cup final, United will play in the Europa League season, but failure to do so would see them miss out on continental football entirely.
Newcastle were three goals up in their game during the first half at a time when United were struggling to repel Brighton, which perhaps explained why Ten Hag felt comfortable taking Fernandes and Martinez off around the hour mark when the match was still level.
Raphael Varane also got a runout late on, making his last Premier League appearance for United, which was a positive sign ahead of the final.
As for Hojlund, his late goal meant he reached double figures in his first Premier League season, having also netted against Newcastle on Wednesday.