WHITE SULPHUR SPRINGS, W.Va. — The San Francisco 49ers hoped linebacker Dre Greenlaw would be back sooner than later after he injured his groin in last week’s win against the Detroit Lions.

On Monday, Niners coach Kyle Shanahan said Greenlaw would be day-to-day this week. On Thursday, it became clear Greenlaw will miss extended time, as he’s slated to have surgery to repair the groin injury, a league source confirmed to ESPN.

Greenlaw’s injury is the third this week to a key 49ers starter that will keep them out for an extended period. It comes on the heels of earlier news that cornerback Jason Verrett and running back Raheem Mostert will miss the rest of the season with knee issues.

While Greenlaw is expected back from his surgery, there is not yet a specific timeline for him to return, though he is expected to have the procedure in the next 24 hours and be out into November before being reassessed, the source said.

Greenlaw appeared to suffer the injury while returning an interception 39 yards for a touchdown just before halftime of last week’s 41-33 win in Detroit. Azeez Al-Shaair replaced Greenlaw after the injury and Greenlaw did not return to the game.

Al-Shaair, who is expected to replace Greenlaw in the lineup, finished with seven tackles, including two for loss, and two passes defended.

“He stood out,” defensive coordinator DeMeco Ryans said. “Everyone could see the effort, the tackling in space, the way he played — that’s the way a linebacker should play. He made a lot of plays for us … I’m excited to where Azeez started the season and he’ll continue to get better and better.”

The Niners, who are staying at the Greenbrier Resort in West Virginia leading into Sunday’s game against the Philadelphia Eagles, are coming off an injury-plagued 2020 season in which they at one point had players worth more than $80 million in salary-cap space on injured reserve.

Losing three starters in Week 1 has caused some Niners captains to take a proactive approach this week in trying to keep their teammates from not falling into a “here we go again” mindset.

“With the last two days working out here, it’s been talked about,” quarterback Jimmy Garoppolo said. “It’s something that you have to address. It’s not like you could avoid it in any way. It’s just one of those things. You’ve got to stay hydrated, do all the right things, the little things behind the scenes, getting with the trainers, getting with the body maintenance people. I mean, there’s a million little things that go into it and we just can’t get lazy, especially early in the season. It’s going to translate to later in the year and just on and on. It’s all tied together.”

The Athletic first reported Greenlaw’s plans to have surgery and miss time.