The San Francisco 49ers have signed Justin Smith to a two-year extension.

"Justin's All-Pro contributions on the field, as well as his leadership on and off the field, are integral to our success," general manager Trent Baalke said in a statement.

Smith signed a six-year, $45 million contract in 2008 and has been incredibly productive for the 49ers.

"You really can't forecast anything out past the year you're in," Smith said. "So I'm thinking about 2013, and 2013 only."