Stoke City presented a new striker, Saido Berahino, before kick-off but wound up sickened by a goalscoring great. Wayne Rooney broke Stoke’s hearts as he surpassed Sir Bobby Charlton’s all-time record for Manchester United, stepping up four minutes into stoppage time to plunder his 250th goal for the club. It was an excellent strike a historic moment for Rooney and a mighty relief for his team.

After 90 minutes United looked on the brink of a defeat that would have ended their 16-game unbeaten run and hampered their hopes of climbing into the top four, let alone mounting an improbable title challenge. But Rooney left an indelible mark on the occasion by reaching a career tally for United that may never be matched.

Wayne Rooney: breaking Manchester United scoring record a huge honour Read more

The goal came from a free-kick wide on the left in what looked like a promising position for a cross. Instead, Rooney curled a wicked shot past the wall and into the far corner. It was a suitably fine way to set a new standard.

It also contrasted starkly with United’s finishing up to that point, which is why José Mourinho devoted much of his analysis to lamenting his team’s profligacy. They had bungled several chances to equalise before Rooney, a second-half substitute, seized the initiative and demonstrated true marksmanship.

What made United’s misses all the more galling for Mourinho was that Stoke’s goal was scored inadvertently by Juan Mata, who deflected a cross by Erik Pieters past David de Gea in the 19th minute.

Mourinho was not blameless. His team’s sluggish attempt to respond to the stimulus provided before kick-off by Swansea’s surprising win at Liverpool was at least partially down to the manager’s flawed selection.

Stoke’s defence has been vulnerable to speed at times this season but Mourinho left Marcus Rashford on the bench and omitted Anthony Martial from the squad. He deployed Mata wide on the right and with Marouane Fellaini in central midfield the United lineup was one that made a priority of solidity over derring-do and, as such, was probably close to the one that Stoke would have selected if given the choice. The hosts were comfortable in the opening exchanges.

United were not. In an intoxicatingly bilious atmosphere United initially seemed cowed. They were stodgy and blunt. Glenn Whelan and Charlie Adam are amongst the least mobile central midfielders in the Premier League but were enjoying parity, at least, with Paul Pogba, Ander Herrera and Fellaini.

The sight of Zlatan Ibrahimovic risked provoking flashbacks for Ryan Shawcross, whose England career was in effect ended by the Swede’s tormenting of him during a memorable friendly against Sweden in 2012 – but United were so short of creativity in the early stages here that Shawcross could ease himself into the game and he went on to perform stoutly.

Wayne Rooney: a patched-up survivor with an astonishing goals record Read more

Neither side mustered a significant attack before Stoke took the lead. Marko Arnautovic found Joe Allen with a clever chest pass and then dashed down the left to receive the return before pulling the ball back to Pieters, who had made a burst into the box. Mata’s attempt to cut out the Dutchman’s cross ended in embarrassment.

Now United had to wake up. Antonio Valencia livened up immediately and broke down the right before floating a nice cross over Shawcross’s head to Ibrahimovic at the back post. But Ibrahimovic’s chest control was fractionally awry, allowing Shawcross to recover and whack the ball to safety. United were soon to squander far better chances.

Pogba, inconspicuous in the first 20 minutes, helped the visitors to gradually take control of midfield. Fellaini got a weak header to a cross from Mata in the 28th minute but at least forced Lee Grant to make a save.

The goalkeeper had no chance of getting his hands to a shot by Mata three minutes later after running off his line to confront Ibrahimovic. That did not matter because after the Swede teed Mata up for a tap-in from eight yards, Mata lifted the ball over the unguarded goal. It was some goof, but a neat way to sum up a painful off-day for the Spaniard.

He was not the only United player with his sights misaligned. Henrikh Mkhitaryan skied one shot so far over the bar, after more good play by Valencia, that Stoke fans belted out a merry rendition of Swing Low, Sweet Chariot. Just before half-time their mocking tune changed to one of acclaim for Grant, who made a sharp reflex save to turn away a sweet volley by Pogba.

Mourinho replaced Fellaini with Rashford in the 55th minute. But Stoke’s resistance had hardened by then, the home team defending valiantly in the face of relentless pressure. Not until 15 minutes from time did United really prise Stoke’s defence open again. Rooney picked out Rashford with a cross from the right. The youngster attempted to guide a shot from the edge of the area into the top corner but curled it wide.

It was left to Rooney to show everyone else how it is should be done.