Manchester United and Chelsea qualified for the Champions League at the expense of Leicester on a frantic final day of the Premier League season on Sunday, while Bournemouth and Watford were relegated to end five-year stays in the top flight.

United won 2-0 at Leicester through goals by Bruno Fernandes and Jesse Lingard to give Ole Gunnar Solskjaer's team a third-place finish.

Chelsea beat Wolverhampton 2-0 after a goal and an assist by Mason Mount and finished in the fourth and final Champions League qualifying place above Leicester, which has been in the top four for most of the season.

Manchester United's Bruno Fernandes, front, scores his side's opening goal from the penalty spot during the English Premier League soccer match between Leicester City and Manchester United at the King Power Stadium, in Leicester, England, Sunday, July 26, 2020. (Carl RecinePool via AP)

Manchester United's Bruno Fernandes, front, scores his side's opening goal from the penalty spot during the English Premier League soccer match between Leicester City and Manchester United at the King Power Stadium, in Leicester, England, Sunday, July 26, 2020. (Carl RecinePool via AP)

Leicester, instead, will play in the Europa League along with Tottenham, which drew 1-1 at Crystal Palace to secure sixth place — above Wolverhampton on goal difference.

The battle to avoid the two remaining relegation places went to the wire as Aston Villa scored in the 84th minute, conceded a minute later, then held on for 1-1 draw at West Ham to survive. Captain Jack Grealish scored Villa's goal in what could be his last game for his boyhood club.

Bournemouth did what it had to do and beat Everton, 3-1, but ended up one point behind Villa. Watford was also relegated as the next-to-last team after losing 3-2 at Arsenal.

Chelsea's Olivier Giroud, right, celebrates with teammate Jorginho after scoring his sides second goal during the English Premier League soccer match between Chelsea and Wolverhampton Wanderers at Stamford Bridge, in London, Sunday July 26, 2020. (Mike HewittPool via AP)

Chelsea's Olivier Giroud, right, celebrates with teammate Jorginho after scoring his sides second goal during the English Premier League soccer match between Chelsea and Wolverhampton Wanderers at Stamford Bridge, in London, Sunday July 26, 2020. (Mike HewittPool via AP)

Manchester City passed 100 goals for the campaign with a 5-0 win over last-place and already-demoted Norwich, a game that marked the last in the Premier League for David Silva after 10 years with City. Kevin De Bruyne got a record-tying 20th assist of the season and also scored twice.

Liverpool ended its title-winning season with a 3-1 win at Newcastle and finished on a club-record 99 points.

Also, Southampton beat Sheffield United 3-1, with Danny Ings scoring his 22nd goal of the season. That left him one behind Leicester's Jamie Vardy, who won the Golden Boot as the league's highest scorer.

Aston Villa's Jack Grealish, celebrates after scoring the opening gosl of the game during the English Premier League soccer match between West Ham United and Aston Villa at the London Stadium in London, Sunday, July 26, 2020. (Andy RainPool via AP)

Aston Villa's Jack Grealish, celebrates after scoring the opening gosl of the game during the English Premier League soccer match between West Ham United and Aston Villa at the London Stadium in London, Sunday, July 26, 2020. (Andy RainPool via AP)

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports