The Chicago Cubs and Kerry Wood have agreed to a one-year contract with a club option for 2013, the team announced Friday at the Cubs Convention, the club's annual fan festival.

The deal is worth $3 million, as is the club option.

"Yesterday it got a little closer," Wood said. "And then today it worked out. But I thought I was with three different teams for about a week there."

Wood said he was nearly ready to sign elsewhere.

"[I was] about 25 minutes [away]," Wood said. "I was waiting for a call to take a physical with another team."

Cubs president of baseball operations Theo Epstein had made it clear he wanted to retain Wood, but even he acknowledged "scary moments along the way." He said there might not have been enough communication during the winter, but that changed recently.

"I had (a conversation) directly with Kerry that was helpful to me, to see where he was coming from a little bit," Epstein said. "Both sides compromised a little bit, and it worked out."

Wood signed a $1.5 million deal with the Cubs last season, leaving a two-year, $10 million contract offer from the Chicago White Sox and a one-year, $5 million offer from the Red Sox on the table.

At the end of last season, Wood said he wanted to return to the Cubs, and if they didn't want him he would retire. But he said he decided he wasn't ready to leave baseball.

"I didn't want to be forced into that," Wood said. "I still love the game. I still have plenty left. But, you know, people are allowed to change their minds."

Wood first met one-on-one with Epstein at a Wrigleyville bar in early November, causing speculation that they had already had a meeting of the minds on Wood coming back. However, according to a major league source, the Cubs' offer didn't go above the $1.5 million that he made in 2011 until recently.

"It all worked out in the end," said Wood. "I'm back in Chicago and I'm back where I want to be."

Wood was 3-5 with a 3.35 ERA in 55 games for the Cubs last season. He suffered a torn meniscus in his left knee in mid-September and had successful arthroscopic surgery on Sept. 30.

Wood came of age as an athlete in Chicago, and a meeting with then-general manager Jim Hendry at a charity event after Ron Santo's funeral last winter paved the way for his return. Less than a week later, a deal was in place.

Wood pitched for the Cubs from 1998-08, winning NL Rookie of the Year honors when he was a hard-throwing starter. He shot to stardom when he struck out 20 Houston Astros in a brilliant one-hitter in just his fifth major league start, but injuries have plagued him.

He missed the entire 1999 season recovering from elbow ligament replacement surgery. In 2003, he helped the Cubs reach Game 7 of the NLCS, where he was the losing pitcher despite hitting a home run against the Florida Marlins.

Shoulder problems nearly ended his career, but he made a stirring comeback and a successful transition to the bullpen, emerging as the Cubs' closer in 2008 and converting 34 of 40 save opportunities.

With Wood's deal, exactly half of the 166 players who filed for free agency have finalized agreements.

Bruce Levine covers the Cubs for ESPNChicago.com. Information from The Associated Press was used in this report.