The 49ers selected offensive tackle Mike McGlinchey in the first round of the 2018 draft with the thought of starting him off at right tackle and, eventually, moving him to left tackle to take over for Joe Staley.

A position switch for McGlinchey became a long-term plan this week after the 49ers signed Staley to a two-year contract extension through the 2021 season.

The 49ers, seemingly, have stability on their offensive line with each of their starters – Staley, McGlinchey, left guard Laken Tomlinson, right guard Mike Person and center Weston Richburg -- signed up for at least three more seasons.

#49ers O-line could be together for a while:

LT Joe Staley, signed through 2021

LG Laken Tomlinson, signed through 2021

C Weston Richburg, signed through 2022

RG Mike Person, signed through 2021

RT Mike McGlinchey, signed through 2021 (fifth-year option available for 2022) — Matt Maiocco (@MaioccoNBCS) June 8, 2019

And the man they are assigned to protect was all smiles upon hearing the news that Staley, a six-time Pro Bowl selection, is going nowhere.

“It’s awesome, especially for a group like that,” 49ers quarterback Jimmy Garoppolo said. “They do so much work together, passing blitzes off, passing blocks off, twists, all that stuff. That’s a group you want to stay together. It’s an important one.

“It makes my job a lot easier. So as long as I can get the ball out on time and do my job properly, we should be in good hands.”

The 49ers have worked to improve their depth on the offensive line, but general manager John Lynch admitted he got a little uncertain about the future when trying to envision life without Staley.

“If he’s not here, what’s it going to look like? And we didn’t like that,” Lynch said. “Not that there are not candidates on our roster. We feel better than ever about our depth, but Joe is a big part of this team in so many ways. It made too much sense.”

[RELATED: DeFo envisions himself making it to 49ers' 10-year wall]

Staley, 34, admitted that his signing of a two-year contract was a move that was based solely on his personal desire to continue to play and do so for the 49ers.

But, then, after thinking about it, he realized the possible steadying impact it could have on his position group. Last season marked the first seasons for McGlinchey and Richburg with the 49ers. Moreover, Tomlinson was acquired in a trade shortly before the start of the 2017 regular season, so he experienced his first full offseason in Kyle Shanahan's offense.

“It’s going to be really cool because it is rare to have an offensive line, potentially, be able to stay together for a really long time, especially in this day and age,” Staley said. “Going into this second year, we feel so much more connection with each other.”