Anquan Boldin will remain with the San Francisco 49ers.

The Niners announced Monday that they have agreed to terms on a two-year contract with the veteran wide receiver.

Anquan Boldin was outstanding in his first season with the Niners, finishing with 85 catches for 1,179 yards and seven touchdowns. Sam Sharpe/USA TODAY Sports

The team did not disclose financial terms, but a source told ESPN NFL Insider Ed Werder that Boldin agreed to a $12 million deal that includes $9 million in guaranteed money.

"We are pleased that Anquan has chosen to continue his career as a 49er," general manager Trent Baalke said in a statement released by the team. "He is a consummate professional whose love and respect for the game provide a tremendous example for all players.

"Anquan has been a very productive player throughout his career, and we look forward to his future contributions to our team and community."

Boldin announced Monday on his Twitter account that he reached a deal to stay with the team.

.@49ers fans, I wanted to be the first to tell you I'm returning to San Francisco - http://t.co/XsGmyZRTSE pic.twitter.com/SgOtlLPTH7 - Anquan Boldin (@AnquanBoldin) March 3, 2014

The 33-year-old also posted a statement titled "The Return To The Bay" on his foundation's website.

"49er fans, I wanted to be the first to tell you that I'm returning to San Francisco," Boldin said in the statement. "Looking forward to joining my teammates, coaching staff and fans to bring back another championship to the Bay Area. Let's go after our Quest For Six."

The 49ers acquired Boldin from the Baltimore Ravens last March for a sixth-round pick.

Boldin had a huge season for the Niners a year after helping the Ravens beat San Francisco in the Super Bowl. The three-time Pro Bowler had 85 catches for 1,179 yards and seven touchdowns.

He also helped fuel the 49ers' offense for the first 11 games while Michael Crabtree was out with a torn Achilles. Boldin was a leader of the team and respected by coaches and players.

ESPN NFL Insider Ed Werder and ESPN.com 49ers reporter Bill Williamson contributed to this report.