Wayne Rooney’s brilliant instinctive winner beat Swansea as Manchester United ended a run of eight games without a win.
The England striker flicked home Anthony Martial’s cross with 13 minutes to go to settle a close contest.
After a dour first half, Martial had headed United in front, before Gylfi Sigurdsson’s glancing effort set nerves on edge at Old Trafford.
Manchester United move up to fifth, two points behind Tottenham.
Swansea’s raids forward were rare, but they twice came close to a second equaliser in injury time as Ashley Williams brought a good save out of David de Gea before goalkeeper Lukasz Fabianski headed narrowly wide from a corner with almost the last touch of the game.
Swansea had won all three of their league meetings with Louis van Gaal’s Manchester United – including the Dutchman’s very first match in charge.
History seemed dangerously close to being repeated for the home fans when Sigurdsson – the matchwinner in Van Gaal’s United debut – steered home Modou Barrow’s cross with 20 minutes to go.
Rooney’s afternoon up to that point had been full of industry but short on inspiration.
However United’s captain improvised brilliantly to flick Martial’s cross round his standing leg and into the far corner past a rooted Fabianski for the winner.
As well as delivering three points for his team, the strike gave Rooney sole possession of second place on the all-time goalscoring lists of the Premier League – on 188, 72 behind Alan Shearer – and Manchester United – on 238, 11 behind Sir Bobby Charlton.
Follow Us