Updated

Jeremy Affeldt wanted some job security — and the reliable reliever got it.

The left-hander and the World Series champion San Francisco Giants completed an $18 million, three-year contract Wednesday. Bobby Evans, the team's vice president of baseball operations, said the deal had been finalized to keep Affeldt in the Bay Area.

"We are so happy to be back with our San Francisco family," Affeldt said.

Affeldt, who returned home to Washington State from San Francisco after taking his physical Tuesday, realizes few relievers can say they will have spent seven years with the same team. The 33-year-old Affeldt went 1-2 with a 2.70 ERA in 67 appearances covering 63 1-3 innings this season for the Giants.

"It's an awesome opportunity to stay in that city for a few more years," he said. "This is what I was looking for — not one year, not one year with an option. When you can get a multiyear deal in one city and give your family some stability, it's a good thing."

When the season ended, he publicly said he wanted to stay but would not accept a one-year deal because he wanted to provide some stability for his family — he has a wife and three young sons. Affeldt also was a key member of the bullpen during the club's 2010 run to the franchise's first championship since 1954.

"I'm glad it got done," manager Bruce Bochy said. "He is such a key swing guy who can be used in the sixth inning on. That was an important sign for us. I'm excited to have the crazy left-hander back. He's getting better with age, his stuff, his command. He is a more complete pitcher now than when we got him. He's doing what you want your players to do: keep getting better."

General manager Brian Sabean called re-signing Affeldt one of his top offseason priorities. Affeldt lives on the West Coast in his hometown of Spokane, Wash., so re-signing with the Giants was appealing from that standpoint as well.

"It's great to retain such a big piece to our bullpen puzzle," Sabean said.

He has spent the past four of his 11 major league seasons with San Francisco, going 10-9 with a 2.73 ERA in 237 1-3 innings and 184 outings.

Affeldt dealt with two bizarre, non-baseball injuries the past two seasons.

In late April, he sprained his right knee and went on the disabled list after he reached out to catch his son, Walker, as the 60-pound 4-year-old jumped off the couch to hug his arriving father.

On Sept. 8, 2011, the pitcher sliced his non-throwing hand nearly to the artery while separating frozen hamburgers during an outdoor barbecue with his family on an off-day. The paring knife he was using pushed through a hamburger patty and deep into his hand. Affeldt came within a millimeter of an artery and underwent surgery about eight hours after the injury to repair nerve damage in his pinkie.

"Those are fluke injuries," Bochy said. "These guys have to live their lives. We let these guys live their normal lives — that's the way it should be. We're all occasionally going to have them, and he has a knack for the good ones."