SANTA CLARA, Calif. -- The San Francisco 49ers and inside linebacker NaVorro Bowman have reached agreement on a five-year contract extension through the 2018 season.

The contract is worth $45.25 million, with $25.5 million in guaranteed money, a person with knowledge of the details said. The person spoke to The Associated Press on condition of anonymity because terms weren't released.

With Bowman's new deal, it keeps one of the best and most-feared linebacking tandems in the NFL together for the long haul -- as fellow inside linebacker Patrick Willis is signed through 2016.

"NaVorro epitomizes what we look for in a 49er," 49ers general manager Trent Baalke said in a statement. "We are excited that the All Pro tandem of Willis and Bowman will be together in red and gold for years to come."

The 24-year-old Bowman, a third-round draft pick in 2010 out of Penn State, has 100 tackles, two sacks and an interception this season as a second-year starter for the NFC West-leading Niners (8-2-1). As a rookie, his 20 special-teams tackles ranked third in the NFL.

In addition to Bowman and Willis, the team's other two starting linebackers are signed at least for the next three seasons -- Ahmad Brooks through 2017 and Aldon Smith through 2015.