Five months after the Nationals let his contract expire following Washington’s loss to the Cubs in the National League Division Series, Dusty Baker is returning to the team that gave him his managerial start in 1993. As Dave Martinez, the man who replaced Baker, continued to prepare for his first Opening Day as a big league manager, the San Francisco Giants on Monday introduced Baker, 68, as a special adviser to team CEO Larry Baer.

“We are thrilled to welcome Dusty back to the organization,” Baer said in a statement. “In addition to being one of the most beloved Giants alumni, Dusty brings a wealth of expertise, knowledge and experience to this position and I know his contributions will be felt far and wide throughout our organization.”

Baker won 840 games during his 10 seasons in San Francisco and led the Giants to the 2002 World Series, where they lost to the Anaheim Angels in seven games. The Giants opted not to renew Baker’s contract after that season, and he went on to manage four seasons with the Cubs and six with the Reds. After two years away from the dugout, Baker was hired to replace Matt Williams in Washington in 2016. He led the Nationals to consecutive division titles, but the team was eliminated in the NLDS in both years. The Nationals’ inability to win a playoff series contributed to General Manager Mike Rizzo’s decision not to negotiate a new deal with Baker.

“This was a pure baseball decision,” Rizzo said last October. “Again, our goal is to win a World Championship. … This has nothing to do with negotiations or dollars. There was not a negotiation with Dusty. I talked to Dusty this morning and told him about our decision. He took the news with his usual class and dignity and professionalism. We hung up the phone with a good taste in both of our mouths.”

Baker lives in Sacramento, but he still has a place in the Bay Area. His son, Darren, a 27th round draft pick of the Nationals last year, is a freshman infielder at Cal, which made his new gig with the Giants all the more appealing.

“I love baseball,” Baker told KGO-TV’s Mike Shumann on Monday. “I love being around baseball. It’s very convenient for me to come to the Bay Area. I’ll be coming a lot to watch my son play at Cal. Things kind of flowed, and if they flow, then you let it go. … My title is special assistant to the CEO, but I’ll be doing a little bit of everything. Going to some Sacramento River Cats games, and coming to some games here. I have other business interests that I had before this job came up, so I got a couple trips back east and I’ll go see their minor league [teams] back east. Just sort of a jack of all trades and try to help the organization get back to excellence.”

Shumann asked Baker, the 14th-winningest manager in baseball history, if he would consider managing again.

“Well, possibly, if it’s the right situation,” Baker said. “I didn’t fire myself in the first place, and I thought I did a pretty good job the last couple of years. Right now, I’m not actively seeking anything. I’m just trying to live my life, enjoying my son and family, enjoy what I’m doing here. I’m not looking for anything, but who knows how life is? Things change.”

During a Tuesday interview on KNBR’s “Murph and Mac” show, Baker revealed that ESPN broadcaster Chris Berman, who is close with both Baker and Giants director of baseball operations Brian Sabean, first mentioned that someone from the Giants’ organization might reach out about a potential role with the team a few months ago. Still bummed about the Nationals letting him go, Baker said he didn’t get his hopes up.

“I didn’t want to be disappointed again, because I was disappointed in Washington, and when I left there, I was quite disappointed and quite disgruntled with the game, just wondering what I had to do to not get fired,” he said. “You sort of make things invisible for a while, and you try to stay busy, and you try to get into your family and get into different things. I didn’t put a lot of stock in it at the time. You just don’t want to be disappointed again.”

Eventually, Sabean called. Baker told Shumann he made sure the Giants had longtime manager Bruce Bochy’s blessing before agreeing to the job.

“I didn’t want to be a threat to anybody, even though I’m not,” Baker said. “Bruce was always the first guy that called me when something happened with another job. He wanted to know what happened.”

“I know Dusty well,” Bochy said Monday, via MLB.com. “I’m excited to have Dusty join us and have another friend and manager that can add to what we’re hoping to do.”

This post has been updated.

Read more on the Nationals: