MANCHESTER, England - Kobbie Mainoo delivered a dramatic 77th-minute winner from the edge of the box, lifting Manchester United to a 3-2 victory over Liverpool at Old Trafford on Sunday.

The win moves United to 64 points, third in the Premier League, and secures their return to the Champions League after a two-year absence.

United raced to an early lead with goals from Matheus Cunha in the sixth minute and Benjamin Sesko in the 14th. Liverpool fought back in the second half: Dominik Szoboszlai capitalized on a giveaway by Amad Diallo in the 47th, and Cody Gakpo equalized nine minutes later after a bad pass from United goalkeeper Senne Lammens found Alexis Mac Allister.

But Mainoo's curling strike sealed the victory, sending Old Trafford into celebration. Liverpool sits fourth on 58 points, level with Aston Villa who have a game in hand.