"Tramaine is a great example of what hard work and dedication can lead to," 49ers general manager Trent Baalke said in a statement. "He has taken advantage of his opportunities since signing with our team as an undrafted free agent in 2010 and has certainly earned this extension. Extending the contracts of our young and talented players has always been, and will continue to be, one of our primary goals."
He had 16 tackles and a forced fumble last season and shared the team lead with 15 tackles on special teams. His primary role was a special-teams standout until he has recently received more responsibility in the secondary.
The 25-year-old Brock made two interceptions in 11 games in 2011. He signed a one-year tender in April for this season.
Baalke and coach Jim Harbaugh have worked to retain their talented young players for the long haul, something they feel is essential to sustaining the franchise's recent success.
The 49ers' talented linebacking corps of NaVorro Bowman, Patrick Willis, Ahmad Brooks and Aldon Smith are signed long-term. Last November, Bowman received a five-year contract extension through the 2018 season, Willis is signed through 2016, Brooks through 2017 and Smith through 2015.
Cornerback Carlos Rogers received a $31.3 million, four-year contract in March 2012.
With Brock now signed for the immediate future, the 49ers can allow Chris Culliver — the team's No. 3 cornerback last season — plenty of time to recover from a season-ending knee injury suffered in August during training camp.
Brown sustained a rib injury during last Sunday's 23-20 loss at New Orleans.
"He's just got to be ready to play every play not knowing he's got built in breaks when we're in base like he had for the first however many games he was playing," defensive coordinator Vic Fangio said Friday of Brock. "There is a change, but it's just got to be a mental adjustment for him."
AP NFL website: www.pro32.ap.org