SAN FRANCISCO (AP) -- Tim Hudson hardly envisioned his career crossing the country once more to bring him back to the Bay Area.
Hudson finalized a $23 million, two-year contract with the San Francisco Giants on Tuesday, returning the pitcher to his professional baseball roots. He began his big league career with Oakland.
''I'd like to start out by saying we're really excited to come back to the bay. This is where I started my career,'' Hudson said. ''Making a trip back across the country quite honestly isn't something I anticipated a couple years ago. When the Giants were interested in me, I quickly realized it was going to be a definite possibility.''
While Hudson had a hard time deciding to leave the Braves - the team he grew up cheering - he understood this would be a great opportunity with a franchise that won the World Series in 2010 and '12. His two daughters were born in the Bay Area.
Hudson had a physical Monday, and the team announced the agreement Tuesday.
''Once we got the physical squared away, there was no question he was going to become a Giant,'' said general manager Brian Sabean, who credited the pitcher for his swift decision.
Hudson gets $11 million next season and $12 million in 2015, and the contact includes a full no-trade provision. He is required to make a $25,000 charitable contribution in each year of the deal.
He made his major league debut with the Athletics in 1999 and went 92-39 in six seasons with Oakland, where the right-hander teamed with Mark Mulder and Barry Zito to form a successful ''Big Three.''
The 38-year-old went 8-7 with a 3.97 ERA in 21 starts this season for Atlanta. His season was cut short by a broken right ankle that required surgery. The Braves earlier this month declined to make a qualifying offer to Hudson, who won 49 games during the previous three seasons.
Hudson was hurt July 24 in New York when the Mets' Eric Young Jr. inadvertently stepped on the back of the pitcher's lower right leg while Hudson covered first base.
While he hasn't begun running on the ankle yet, he had a screw removed last week and expects to be full strength for spring training.
''The ankle's coming along just fine, not quite 100 percent right now but it's well on its way,'' he said. ''I anticipate in the next month or so start throwing bullpens.''
San Francisco, which missed the playoffs this year, is seeking another starter to join Matt Cain, Madison Bumgarner and Tim Lincecum in a rotation losing Zito and probably also free-agent righty Ryan Vogelsong.
Cain and Bumgarner are signed long term, while Lincecum received a $35 million, two-year deal last month.
''They have a ton of talent here, I was excited to join this rotation,'' Hudson said. ''They're really good. They probably don't need my help.''
Hudson was drafted by the A's in the sixth round of the 1997 amateur draft out of Auburn.
Oakland traded Hudson to the Braves in December 2004 and he pitched nine seasons in Atlanta. The three-time All-Star earned NL Comeback Player of the Year honors in 2010 after he returned from elbow ligament replacement surgery to go 17-9 with a 2.83 ERA. He had surgery for a herniated disk in November 2011.
The Giants had been eager to find an experienced starter to fill in the rotation. Zito just finished a $126 million, seven-year contract and had his $18 million option declined. Vogelsong's $6.5 million option also was turned down by the club.
''Great news with the need that we have for pitching here and to get Tim, who was one of the highly sought pitchers out there. I couldn't be more thrilled,'' manager Bruce Bochy said. ''It certainly helps fill a very important need for us as we try to get back on track here. ... For him to choose us, we're honored and I look very forward to working with him.''
Hudson traded text messages with good friend Zito on Monday - and now is filling a rotation spot vacated by Zito's departure.
''It's a bit odd,'' Hudson said. ''We go back a long way. We were texting a little bit yesterday. He's happy for me and my family but it's a little bittersweet. I texted him I wish he'd been here with me. The game is what it is. Chapters open and close. I wish him the best.''
Hudson is 205-111 in a 15-year career and was coming off a $36 million, four-year contract.
After snapping a career-worst 10-game winless streak with a 13-4 victory July 6 at Philadelphia, Hudson went 4-0 with a 3.10 ERA in his last four starts.
Hudson will pitch to 2012 NL MVP and batting champion Buster Posey, who is signed through 2021. Right fielder Hunter Pence was given a $90 million, five-year contract before the season ended.
''I can't wait to get out here and help us win every fifth day. ... I feel I can pitch toward the top of any rotation,'' Hudson said. ''This is going to be a new chapter for me and my family.''