Robert Hagg, the rugged defenseman who has been playing arguably his best hockey of the season, will come out of the lineup Thursday night and be replaced by Shayne Gostisbehere as the Flyers host the New Jersey Devils.

Gostisbehere missed 10 games after undergoing arthroscopic surgery on his left knee. The Flyers went 7-2-1 in that span.

Coach Alain Vigneault said it was a difficult decision to remove Hagg from the lineup.

“Haggs has been playing well. I talked to him this morning,” Vigneault said. “He’s not happy with not playing. I expect him to not be happy about it. But Shayne is ready to go, and I want to get him in. ... Sometimes you have to look at the big picture.”

The player they call Ghost will be on the third pairing with veteran Justin Braun and will quarterback the second power-play unit. The surgery, he hopes, will help his game, which relies on quick lateral movement.

“Mentally, there are certain movements where I don’t have to worry about it hurting,” he said after Thursday’s morning skate at the Wells Fargo Center. “I can go out there and play freely and be myself. I think that’s a big thing for me. [When] you’re not thinking of anything else but the game, I think it helps a lot.”

Gostisbehere, who has been rumored in trade talks -- he wants to stay with the Flyers -- has five goals and 12 points in 40 games and is plus-2. He has just one power-play goal.

He said he would “ease into” the action. “I’m not going to try to do too much. I’m going to play my game and do what I’m good at, and hopefully it goes well.” he said.

Hagg had five points and a plus-5 rating in his last 10 games. Overall, he has a goal, nine points and a plus-7 rating in 34 games. Despite not playing in 19 games, he leads the Flyers with 97 hits.

“It is what it is,” Hagg said about his benching. “You can only control your own game. I mean, I’m happy with my game so far. ... Of course I’m [mad] I’m not playing, but there’s nothing I can do.”

With a rugged schedule ahead of them, there is a chance Vigneault goes back to rotating the defensemen and playing two out of a trio of Hagg, Phil Myers and Gostisbehere. Starting Thursday, the Flyers play four games over the next six nights and six games in the next 10 nights.

Farabee out of lineup

Left winger Joel Farabee, one of the Flyers’ best all-around players the last few weeks, will miss Thursday’s game with the flu.

The Flyers recalled Andy Andreoff from the Phantoms, and he will be on the fourth line against the Devils. He will play on a line with rookies Connor Bunnaman and Nic Aube-Kubel.

Michael Raffl will move from the fourth line to the second unit, taking Farabee’s spot on a unit with Sean Couturier and Jake Voracek.

Farbee has six points (two goals, four assists) over the last six games, the second-most points by an NHL rookie in that span.

Goalie matchup

Brian Elliott, who is 4-0-1 with a 1.58 GAA and .935 save percentage since Carter Hart was sidelined, will face the Devils’ Mackenzie Blackwood.

Overall, Elliott is 13-5-4 with a 2.81 GAA and .903 save percentage; Blackwood is 15-12-7 with a 3.00 GAA and .904 save percentage.

Hart notched 4-0 and 4-3 shootout wins against New Jersey this season. Thursday is the third of four meetings between the teams in 2019-20.

Breakaways

Defenseman P.K. Subban (6 goals, 11 goals, minus-18), who missed the last game with an illness, will return to the Devils’ lineup. New Jersey will be without center Nico Hischier (32 points, second on the team) and defenseman Sami Vatanan (12 points, minus-12), both of whom are injured. ... The Devils’ Jack Hughes, the No. 1 overall pick last June, has six goals and 18 points. ... Only Tampa Bay and Columbus have more points than the Flyers over the last 10 games.