MANCHESTER, England — Manchester United overcame a sloppy first-half performance to beat Newcastle 3-1 and stay in second place in the Premier League on Sunday.

After United managed just one victory in its previous five top-flight matches, Ole Gunnar Solskjaer felt a 4-0 victory at Real Sociedad in the Europa League showed his side had got over its recent slump.

While United fell well short of those standards against Newcastle, second-half goals from Daniel James and Bruno Fernandes pushed the team to an important win after Newcastle winger Allan Saint-Maximin had cancelled out Marcus Rashford’s opener at Old Trafford.

The result kept United within 10 points of Manchester City and above third-place Leicester on goal difference, while defeat for Newcastle manager Steve Bruce at the stadium he used to play left his 17th-place team just three points above resurgent Fulham in the relegation fight.

It was a happy end to a day that started with United announcing that two members of United's backroom staff — Nicky Butt and Mark Dempsey — would be joining Solskjaer on the bench “due to some of the coaching staff having to self-isolate."

Michael Carrick, Mike Phelan and Kieran McKenna were not listed on the team sheet for a game that Newcastle started sharply.

David De Gea tipped over a deflected effort from Joelinton that came from the goalkeeper's poor early clearance.

Newcastle deployed Miguel Almiron as a false nine and was unsettling United with its pressing, while the hosts’ poor decision-making saw their attacks break down before Newcastle goalkeeper Karl Darlow could be threatened.

A fierce cross from James was all the Magpies goalkeeper had to deal with until Aaron Wan-Bissaka’s snatched effort in the 29th minute, although Rashford’s moment of quality would see United find the net a minute later.

Rashford collected the ball on the left touchline and nutmegged Emil Krafth before darting toward the box. The Newcastle right back recovered to meet him in the area, only for Rashford to cut inside and thump a low shot past Darlow at his near post.

Saint-Maximin had a strike tipped over the bar by De Gea after collecting a cleared corner, which proved the route to Newcastle's equalizer in the 36th.

Joe Willock eventually sent in a cross that Harry Maguire headed into the path of Saint-Maximim, who impressively sidefooted a shot into the roof of the net.

De Gea reacted well to Saint-Maximin’s next snapshot early in the second half, before the home side went back ahead.

Nemanja Matic turned and hit a low pass — which took a slight deflection off Fernandes — across the box that Jamal Lewis failed to cut out, with James capitalizing at the back post as he hit a low and hard shot past Darlow.

Anthony Martial followed nifty footwork with a fizzing effort that Darlow did well to stop as the home side looked to pull away, with Rashford seeing a long-range attempt stopped before Ryan Fraser tried his luck on a rare voyage forward by Newcastle.

Newcastle was now under increasing pressure and gave United the chance to put the match to bed when Willock was adjudged to have brought down Rashford.

Fernandes stepped up for the 75th-minute spot kick and slotted home.

Substitute Mason Greenwood, Fred and James tried to add gloss, with Maguire having headed attempts either side of one from Matic.

Solskjaer handed exciting Newcastle-born Shola Shoretire — who only turned 17 on Feb. 2 — his debut off the bench in the closing minutes.

___

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports