SANTA CLARA ? The 49ers struck a deal Thursday with left tackle Joe Staley to keep him under contract through the 2017 season.

Staley, whom the 49ers traded up to select with the No.28 overall pick in the 2007 draft, signed a six-year extension after playing every offensive snap for the club in his first two seasons in the league.

?Joe Staley is the type of player we want to continue to add to this football team,? 49ers general manager Scot McCloughan said. ?We know what he means to the success of the 49ers and getting this extension done puts us in a very nice position for the future.?

Staley becomes the second young player the 49ers have locked up to a long-term extension this offseason. In April, the 49ers signed outside linebacker Parys Haralson to a four-year deal through the 2013 season.

?It?s very important if you?re trying to build a winning franchise to keep people around for an extended period of time,? Staley said. ?That?s how you win games. I believe the front office understands and the ownership understands that?s how you win championships. I want to play my whole career here. Now we can start our move forward.?

The 49ers are likely to be interested in signing linebacker Patrick Willis to a new contract, too. Willis? contract voids after the 2011 season. He was selected to the Pro Bowl after both of his first two seasons.

The 49ers now appear to have stability at the most important position on the offensive line with Staley signed for the foreseeable future. He said he expects to play left tackle for the remainder of his time with the franchise.

?I?ve had meetings with coaches and the indication is I?m the left tackle here, and that?s what I?m going to be,? Staley said. ?That?s my position. Everybody else can compete for other spots on the line.?

Agent Rick Smith, who represents Staley, said he is not aware of any recent first-round pick who has renegotiated a contract after just two seasons. Staley had three years remaining on his original five-year, $6.8 million contract. Terms of his new deal were not immediately available.

?I never went to them looking for a contract deal,? Staley said. ?I wasn?t expecting anything. I was thinking maybe if I had a solid year next year. But they showed they believe in me enough to get this deal done. They want to keep a lot of the core young players building. ?

For more on the 49ers, go to Instant 49ers at You can reach Staff Writer Matt Maiocco at 521-5492 or matt.maiocco@press