Marcus Rashford scored the stoppage-time goal for Man U. Press Association

Watch: Manchester United steals win with last-minute goal vs. West Ham

Manchester United was seconds away from a frustrating draw against West Ham, but Marcus Rashford saved the day with a stoppage-time goal that secured a dramatic victory.

With less than a minute left, Edinson Cavani took a pass from Anthony Martial in the box that looked dangerously close to being called offsides. But the official's flag stayed down, and Cavani sent a cross that found Rashford for an easy goal.

A lengthy VAR check followed the goal, but it was allowed to stand. Manchester United finished the match with 18 shots compared to only six from West Ham.

With the win, Manchester United moved ahead of West Ham and climbed to fourth place in the Premier League table. The top four teams at the end of the season qualify for the group stage of the UEFA Champions League.

More must-reads:

TODAY'S BEST
Do Oilers need more from Connor McDavid to get to Stanley Cup Final?
All-Rookie teams show gems available all over draft
The NBA has not witnessed this much parity in 50 years
Knicks expected to be 'aggressive' in upgrading their roster
Drew Bledsoe offers advice for Patriots rookie QB Drake Maye
2024 AFC revenge games: Brothers, 'Stefon Diggs Bowl' to take center stage
2024 NFC revenge games: Which game should Cowboys, others have circled?
How All-Star Race victory could turn Joey Logano's season around
Xander Schauffele's triumph could open the floodgates for his career
Anderson Silva, Chael Sonnen will finish off their trilogy in a boxing ring
Ranking the five best MLB free-agent signings of offseason
Veteran WR, former first-round pick announces NFL retirement
Oilers advance to West Final again after holding off Canucks in Game 7
Bengals star WR not expected to sign franchise tender before OTAs
Red Sox RHP diagnosed with ligament damage in elbow
Watch: Caitlin Clark shows off range with logo three, but Fever fall short
Former Dolphins receiving leader announces his retirement from NFL
Detroit Lions dominate PFF's top-25 players under 25
Hall of Famer, legendary Raiders offensive lineman dead at 86
Report: Cavs owner 'would never' trade Donovan Mitchell to this team