SAN FRANCISCO -- Aubrey Huff could have written the verse from the song "San Francisco" that goes, "Other places only make me love you best."

What little tension surrounding Huff's free agency and whether he would bolt for another team vanished Tuesday when the Giants, the only club he truly wanted to play for, retained him with a two-year, $22 million deal that included a club option for 2013.

Huff wants to perpetuate the camaraderie and success the Giants enjoyed last season as they surged to their World Series triumph.

"There was big interest out there," Huff acknowledged in a news conference at AT&T Park. "But in the end, it wasn't going to take much to come back here for me. Some other team would have had to blow me away with like a four-year deal or something and a lot of dough to stay away from here.

"I've played nine years of losing baseball for not-so-good teams, and this is the most fun I've had playing baseball in my life. To be able to come back and try to have a chance to defend this title which we earned this year, and to do it in this great city and this great organization, it's actually a big moment for me."

It also was a big moment for the Giants. They addressed one of their top offseason priorities by keeping Huff, their top run producer during 2010.

"There aren't many players who can do what Aubrey can do," Giants manager Bruce Bochy said, citing Huff's versatility, prowess as a left-handed batter and his essential role, red thong and all, in the team's renowned chemistry.

Huff will receive $10 million in each of the next two seasons and will get a $2 million buyout if the Giants decline to pick up his $10 million option for 2013. That dwarfs the $3 million Huff earned last season, when the Giants signed him only after failing in their efforts to obtain free agents Nick Johnson and Adam LaRoche.

Giants general manager Brian Sabean said that another team's interest in Huff hastened the deal late last week following "a little bit of a moratorium" to allow the veteran to contemplate his options. A partial list of teams seeking offense at first base or in general includes the Red Sox, Mariners, Dodgers, White Sox, Twins and A's.

"One other club accelerated their interest and we played tag with that and were able to get in a position where we matched what the other club did," said Sabean, who emphasized the importance of maintaining continuity by holding onto Huff. "Aubrey wanted to be a Giant versus going somewhere else."

As Huff said, referring to the mystery team, "Whoever it might have been or who was interested, the point's moot. This is where I wanted to be."

Huff, who turns 34 on Dec. 30, was pleased to settle his playing status relatively early in the offseason.

"With all the craziness of the postseason and getting all the way to the World Series, to get it done this quickly and out of the way is something I really wanted to do and I'm sure the front office wanted to do the same," Huff said.

Huff became one of baseball's biggest bargains last season by hitting .290 with a team-high 26 home runs, 86 RBIs and 83 walks. He ranked among the league leaders in on-base percentage (10th, .385) and slugging percentage (12th, .506), while establishing a personal best with 100 runs. Huff became a fixture in the middle of the Giants' batting order, hitting third in 98 games, batting fourth 40 times and occupying the fifth spot 13 times.

Huff, who placed seventh in the National League Most Valuable Player balloting, also contributed defensively, performing adroitly at first base and starting 57 games at the outfield corner positions. Bochy admitted that Huff's defensive expertise at first base surprised him "a little bit." As for playing outfield, Huff deadpanned, "I told [Bochy] I was the best athlete on the team and I could handle it."

Huff's carefree attitude didn't inflate the value of his contract, but it accented the Giants' desire to bring him back as an often humorous, sometimes serious clubhouse influence.

"That certainly helped, because we know his presence in there is a big one," Sabean said.

"He plays the game the way you want your players to, and that's play it hard but also loose," said Bochy, who credited Huff with "changing the dynamic of the clubhouse." Bochy added, "He doesn't take himself so seriously, but he takes the game seriously."

Another player integral to the Giants' success, infielder Juan Uribe (.248 batting average, 24 homers, 85 RBIs), remains a free agent. Sabean said that talks with Uribe, who was offered salary arbitration on Tuesday, were active but indicated that no deal appeared imminent.

"I think both parties are willing to do something faster, but we're just not talking the same language yet, as far as ballpark figures," said Sabean, adding that the Giants have explored trade possibilities for another shortstop.

Tampa Bay's Jason Bartlett, Kansas City's Yuniesky Betancourt and Boston's Marco Scutaro are among the shortstops thought to be available through trade.