Jesse Lingard's thunderous strike lit up what ended up being a nervy Manchester United win as relegation-threatened Middlesbrough rallied under caretaker boss Steve Agnew.
The sides' final match before the international break always promised to be an intriguing encounter. For Boro, it was their first since Aitor Karanka's sacking while United were reeling from key absentees and a demanding schedule.
Jose Mourinho said the fixture pile-up meant United would probably lose at the Riverside but they emerged victorious, with Lingard's powerful drive the standout moment in a 3-1 victory.
The England winger took aim from 25 yards and found the top right-hand corner with an outstanding effort, deservedly adding to Marouane Fellaini's first-half header.
It had looked like United's 600th Premier League win would be straightforward against goal-shy Boro, only for Rudy Gestede to capitalise on lax defending to reduce the deficit - his side's first league goal since January 31.
Belief grew around the Riverside only for an embarrassing moment to settle the match as Antonio Valencia capitalised on former United team-mate Victor Valdes' slip to wrap up a win that moves his side up to fifth.
Tempers frayed towards the end of a match, with Gestede and Eric Bailly squaring up to each other in an unseemly end to the game with tensions still high as the players made their way down the tunnel after the final whistle blew.
United were without Paul Pogba, Ander Herrera and Zlatan Ibrahimovic through injury or suspension, with the latter's absence meaning Marcus Rashford led the line.
The veteran's outstanding form has restricted the 19-year-old's chances through the middle and perhaps that rustiness contributed to his failure to net a seventh-minute opener, having ghosted past Bernardo only to see his low strike saved by Valdes.
It was a let-off for a Boro side during what had actually been a bright start, playing with an intensity and confidence which belied their miserable run.
The talented if inconsistent Gaston Ramirez forced David de Gea into action but that was as good as it got for Agnew's men in the first half as they reverted to form.
Boro's backline was being unsettled by Rashford's movement and prised open with increasing regularity, requiring Valdes to be at his best to keep it scoreless in the 23rd minute.
Rashford's frustration was clear after he somehow failed to turn home a fine Juan Mata cross, with United's former goalkeeper producing a superb reaction save to deny the teenager before stopping Valencia's follow-up.
Such heroics could not prevent what had felt like an inevitable opener arriving on the half-hour mark. Ashley Young, deployed as left wing-back, cut onto his right foot and floated a cross to the far post for Fellaini to power in a header.
Boro's response to the goal was creditable but, like so many times this season, intricate build-up play was not matched by an end product. Neither side saw fit to make half-time alterations and Middlesbrough started the second period brightly, albeit again without De Gea being put under the cosh. That intent was leaving United space to exploit on the break, with ponderous play from Rashford forgotten after Lingard sent the travelling fans wild.
Leading the charge from just inside his own half, Lingard chose against passing to Mata and Rashford. Instead, the 24-year-old took aim from 25 yards and rifled an outstanding strike into the top corner, leaving Valdes motionless.
But the game was not over as Alvaro Negredo, a handful all afternoon, directed two headers off-target as Boro pushed for a goal that arrived in the 77th minute.
January signing Gestede shot past De Gea after some woeful defending and Negredo claimed a penalty after going down under pressure from Phil Jones.
But Valdes' slip in injury time allowed Valencia the simplest of tap-ins to finally kill off the home side.