SAN FRANCISCO -- Jonathan Martin, the offensive tackle who accused a Miami Dolphins teammate of bullying, was traded to the San Francisco 49ers on Tuesday night and will be reunited with his college coach, Jim Harbaugh.

The Dolphins announced the move on the first day of NFL free agency. San Francisco confirmed the trade, saying only that it would send an undisclosed draft choice to Miami and that Martin still must pass a physical to complete the deal.

Miami will receive a conditional seventh-round pick in 2015 if Martin is on San Francisco's opening 53-player roster, a league source told ESPN NFL Insider Adam Schefter.

Martin's move cross country brings him back to the Bay Area, and he has been taking classes at Stanford again.

"This is great for him to get back on the field, and he's in Palo Alto right now," his agent, Ken Zuckerman, said in a phone interview. "It couldn't be much better. I just think everyone wanted this to happen. Harbaugh knows Jonathan, I think the Dolphins were compensated and Jonathan wants to get back on the field. It's a good day."

Martin expressed his excitement via Twitter on Tuesday night:

Opportunities are few in the NFL... Can't wait to get to work #9erEmpire - Jonathan A. Martin (@J_Martin71) March 12, 2014

An investigation for the NFL by Ted Wells determined last month that Dolphins guard Richie Incognito and two other offensive linemen engaged in persistent harassment of Martin, another offensive lineman and an assistant trainer.

The trade capped a busy first day for the 49ers, who lost to the Super Bowl champion Seattle Seahawks in the NFC Championship Game.

Martin left the Dolphins in late October, underwent counseling for emotional issues and alleged he was harassed by teammates. Incognito was ultimately suspended for the final eight games.

"We feel that this move is in the best interests of all parties involved," Dolphins general manager Dennis Hickey said. "We wish Jonathan well."

The Dolphins traded offensive tackle Jonathan Martin to San Francisco for a conditional draft pick. AP Photo/Louis Lopez

After Wells' report was released last month, the Dolphins fired offensive line coach Jim Turner and longtime trainer Kevin O'Neill. Incognito and John Jerry, who was also implicated in the report, became free agents Tuesday and are not expected to play for Miami again.

Incognito has recently received treatment in the wake of the scandal. He sent tweets in recent weeks that varied dramatically in tone, including a rant at Martin that quickly went viral.

Martin's departure from the Dolphins had been expected. Owner Stephen Ross said in January that he didn't expect Martin to play for the team again.

In an interview in January, Martin said frequent vulgar language around the team made him feel trapped and that's why he left in October. Wells' investigation determined Incognito and two teammates did indeed engage in persistent harassment.

The relationship between Martin and Incognito drew national scrutiny and stirred a debate about bullying. Martin, 24, said he tried to be friends with Incognito despite their diverse backgrounds. Martin was a classics major at Stanford, while Incognito, 30, was kicked off the team at Nebraska and went on to build a reputation as one of the NFL's dirtiest players.

Martin, who protected Andrew Luck's blind side at Stanford, was a second-round draft pick by Miami in 2012. He became a starter as a rookie but struggled at times while being shuffled between right and left tackle.

Last year he was part of a line that allowed a franchise-record 58 sacks. The Dolphins began revamping the line Tuesday by agreeing to terms with Pro Bowl left tackle Branden Albert.

Information from The Associated Press was used in this report.