SAN FRANCISCO (AP) -- As hard-hitting safety Donte Whitner headed out of the Bay Area for his hometown of Cleveland, the San Francisco 49ers wasted little time finding someone to fill his position.
Safety Antoine Bethea agreed to a $23 million, four-year contract with the Niners on Tuesday as the NFL's free agency period began, and then the 49ers acquired offensive tackle Jonathan Martin from the Miami Dolphins on Tuesday night to reunite him with former Stanford coach Jim Harbaugh.
Bethea announced on Twitter he had joined the 49ers, saying: ''Glad to be a Niner!! Going to the Bay!!!'' A person with knowledge of Bethea's contract provided details of the financial terms, speaking on condition of anonymity because they weren't announced and the 49ers had yet to acknowledge the signing.
Also Tuesday, veteran place kicker Phil Dawson received a new two-year contract after a sensational first season in San Francisco. Dawson announced on his Twitter page that he had re-signed, then the team made it formal.
The sides had discussions over the past two weeks.
''My experience being on the inside did nothing but confirm what I already knew to be true, that San Francisco is a super attractive place to play and my experience last season only furthered that notion in my mind,'' Dawson said. ''Coming into free agency, my No. 1 goal was to remain a 49er. Fortunately that was able to work out.''
Whitner, meanwhile, announced on Twitter he would join the Browns: ''To all my former teammates and coaches. I love you all! I will always cherish you guys!'' he wrote.
And linebacker Patrick Willis wrote on Twitter, ''Man (at)DonteWhitner u will be missed G.''
For the second straight March, San Francisco watched a top safety leave for a big contract elsewhere. Last year, Dashon Goldson departed for Tampa Bay and 2013 top draft pick Eric Reid replaced him.
The 29-year-old Bethea had 110 tackles, two interceptions and a sack last season, his sixth straight year starting every game for the Indianapolis Colts.
''The thing I love about the 49ers is when they lose someone they pick someone up, which we certainly did that with Antoine,'' Dawson said. ''I'm excited to get to know him and certainly I've followed him through the years. We're going to try to keep on plugging forward and keep on getting better.''
The 49ers' secondary also lost cornerback Carlos Rogers after three seasons Tuesday, an expected cost-cutting move by the team. Cornerback Eric Wright posted a photo on his Instagram account via Twitter of a new 49ers contract, but the team didn't confirm he had received a new deal.
San Francisco also acquired quarterback Blaine Gabbert from Jacksonville for a sixth-round draft pick this year and a conditional pick next season, apparently finding a capable backup for Colin Kaepernick. The deal was pending a physical.
Gabbert started the first three games for Jacksonville last season before being benched in favor of Chad Henne, re-signed Friday to a two-year contract worth $8 million.
The 24-year-old Gabbert was the 10th overall draft pick in 2011 out of Missouri. He has thrown for 22 touchdowns in three NFL seasons, completing 414 of 777 passes for 4,357 yards in 28 games and 27 starts.
''We thought highly of Blaine as an early entry into the 2011 NFL draft,'' 49ers general manager Trent Baalke said. ''He is a high-character individual that will be given every opportunity to develop within our system and we are looking forward to working with him.''
Bringing back Dawson has been a top priority for both sides for months - with Harbaugh saying, ''pay the man'' - and it got done quickly. The 39-year-old Dawson was a big reason the 49ers returned to the NFC championship game.
In his first year with the 49ers following 14 seasons in Cleveland, Dawson converted 32 of 36 field goals and set a franchise record with 27 successful field goals in a row.
''Phil has been a consummate pro and clutch performer his entire career and we are pleased that he has chosen to continue on with the 49ers,'' Baalke said. ''It was important to this organization to have a veteran kicker like Phil as we enter our first season in a new stadium.''
The 49ers move into the new $1.2 billion Levi's Stadium at team headquarters this year. Soon, Dawson will return from his family home in Austin, Texas, to start practicing at the new stadium, where the NFL's first automatic collapsible goal posts were installed last week.
Dawson plans to keep playing as long as he can maintain his high level.
''I want to be a difference-maker for my team,'' he said. ''Signing this contract I fully expect to live up to those standards and then some.''
With Rogers' departure, San Francisco cleared $5.1 million in salary-cap room.
The 32-year-old Rogers, who missed time late in the season with a strained right hamstring, had 47 tackles and two interceptions last season. Rogers received a $31.3 million, four-year contract in March 2012 and was due to earn $6.6 million in 2014.
The 49ers announced they tendered one-year contracts to restricted free-agent tight end and defensive tackle Demarcus Dobbs and exclusive rights free-agent linebacker Michael Wilhoite.
AP NFL website: www.pro32.ap.org