Manchester United will travel to Liverpool on Sunday in high spirits after eliminating Wolves from the FA Cup. Ole Gunnar Solskjær’s side, who will play Tranmere or Watford in the fourth round, can take on their fiercest rivals boosted by a second win of the week.

United are the only side to take any points off Jürgen Klopp’s Premier League leaders this season. “It’s hard but I’ve had Liverpool here twice and drawn both,” Solskjær said. “We want to win those games but we’ve found a nice way of playing against them, so let’s wait and see.”

The replay against Wolves was played before a below capacity crowd but of more concern for United was the injury sustained by Marcus Rashford only 15 minutes after coming on as a substitute. The club’s top scorer will have tests to determine his availability for Anfield.

Daniel James came close to giving United the best start in an effervescent first half. Juan Mata had shone against Norwich and he was to prove the matchwinner in an impressive performance. His pass put James away and only a deft hand from the excellent John Ruddy thwarted the winger.

Wolves’ Raúl Jiménez fashioned a clear sight of Sergio Romero’s goal via a swivel that sent Brandon Williams, Harry Maguire and Nemanja Matic into a different postcode. Adama Traoré had delivered a pinpoint pass to the striker only for him to hit the ball straight at the United goalkeeper.

It was all part of a breathless start that was about to have the latest instalment in the VAR soap opera. Fred and Matic had a farcical mix-up in which the former smacked the ball off the latter into Jiménez’s path. Yet when Maguire went to challenge the ball ricocheted off the striker’s right hand and, though Neto finished, VAR ruled the effort out. Jiménez was looking the other way and thus had no part in the action but this was the correct decision.

Cue frustration for Wolves and gleeful schadenfreude for the United faithful. The emotions were reversed when a sharp Aaron Wan-Bissaka pass released Anthony Martial only for him to slide to the turf.

Next up in an open and entertaining contest was a corner won by Jonny. João Moutinho took it short, received the ball back and United were relieved to clear his cross. Later, they had a lucky escape: a Jonny cross was headed by Matt Doherty past Romero but rebounded off a post. Jiménez looked to pounce but was ruled offside.

A helter-skelter first half had Matic giving the ball away, chasing and winning it back, before beginning an attack that had Martial scampering forward but he could shoot only tamely.

Wolves’ Neto rifles past Sergio Romero in the first half only for the effort to be disallowed by VAR for handball. Photograph: Paul Ellis/AFP via Getty Images

A note was passed by Solskjær to Mata and the latter later joked about what it contained. “It was a list of grocery shopping, bread milk and other things,” he said.

Solskjær was more revealing. “A couple of times we went out of shape – we adjusted it for five-10 minutes before half-time,” the United manager said.

Each manager’s instructions for the second half will have been similar: tighten up at the back and be more ruthless when opportunity knocked.

Solskjær had Rashford warming up and the 22-year-old had a front‑seat view from the touchline of James firing past Ruddy and coming close to breaking the deadlock.

Any control for United came via Matic and Fred in midfield though they were still vulnerable when Wolves wrested back possession, moved forward and worked the ball to the eager Jiménez. But he, again, missed with an attempt from an angle.

Quality had taken a downturn. Even Kevin Friend seemed affected, the referee showing Neto a yellow card when Williams appeared to jump over his leg rather than be felled by it. Yet the left-back did impress with a show of pacy, muscular defending that took him back alongside Neto as he sprinted into the area. The 19-year-old dispossessing the winger and cleared the danger while drawing applause from his goalkeeper.

On 65 minutes Solskjær removed James for Rashford and Greenwood for Andreas Pereira. And now, at last, Mata struck: the playmaker ran on to a Martial through ball and expertly chipped Ruddy.“I had a lot of time and it’s not good, better not to have time when you are facing a goalkeeper,” Mata said.

Nuno Espírito Santo was disappointed. “It is frustrating when you perform well and go out,” the Wolves manager said.