David Ortiz suspected from the start that the Red Sox eventually would hire John Farrell away from Toronto Blue Jays as their next manager.

General manager Ben Cherington, Ortiz knew, wanted somebody who would command respect in the clubhouse and work effectively with the front office to change the direction of the franchise after a 93-loss season.

“There is something that they see in him,” Ortiz said Sunday after learning the Red Sox had signed Farrell to a three-year contract. “Ben got his guy and he has things lined up to make the ball club better. He wanted Farrell to be part of that.”

The 50-year-old Farrell had a year remaining on his contract with the Blue Jays and extricating him from that deal took 10 days of high-level negotiations between the teams. The Red Sox eventually gave up their starting shortstop, Mike Aviles, as compensation.

It was only the sixth time in major league history a manager under contract was essentially traded to another team.

Farrell started the process Oct. 9 when he told Blue Jays general manager Alex Anthopoulos that he wanted to leave Toronto after two seasons and replace the fired Bobby Valentine in Boston.

“John expressed to me that he’d really like an opportunity to pursue that if it came about,” Anthopoulos said during a conference call. “As John explained it to me, this was a dream job for him, an opportunity he really wanted to pursue.”

The Red Sox had not yet requested permission of the Blue Jays to speak to Farrell. That came a few days later when principal owner John Henry called Toronto team president Paul Beeston.

The discussions were not without some rancor, the Blue Jays growing angry about media coverage of the situation.

“There was a lot of, to be completely candid, gamesmanship and a lot of things that went on from a negotiating standpoint. Not on our end, just a lot of things that were coming out that were completely false,” Anthopoulos said.

“We’re pretty good in terms of not putting things out there in the media and leaking things or saying things. The upsetting part for me were how many false reports were out there that I didn’t think were fair to John or to myself or to the organization.”

Anthopoulos also was annoyed that the news was leaked to the Boston media late Saturday night, breaking an agreement between the teams. Commissioner Bud Selig did not approve the deal until Sunday.

“It probably didn’t go as smoothly as we think it could have,” Anthopoulos said.

The Red Sox will have a news conference early this week at Fenway Park. But statements released on Sunday made clear their joy.

“I’m extremely excited to be returning to the Red Sox and to Boston,” Farrell said. “I love this organization. It’s a great franchise in a special city and region, with great fans, and we want nothing more than to reward their faith in us.”

Said Cherington: “We are thrilled to name John Farrell as our new manager. I have known him in various capacities throughout my career, and I hold him in the highest regard as a baseball man and as a person.”

Farrell was the successful pitching coach of the Red Sox from 2007-10. With Terry Francona seemingly entrenched as manager and Farrell desirous of running his own team, he left for Toronto.

When Francona was fired following the collapse of the 2011 Red Sox, it created what Anthopoulos called “a perfect storm” of events that led to Farrell returning to Boston.

“I don’t think anybody could have expected that,” he said.

Anthopoulos would not comment on the widely held belief that the Sox tried to get Farrell after last season. But he said he had respect for Farrell being honest with him.

“I understand the connection; I understand the ties,” Anthopoulos said. “John had been there a long time and had a lot of strong relationships there. Spent a lot of time in the city. It’s not completely foreign to me why there would be an appeal there. That’s how he expressed it to me; this was the one job. There was no other city for him that was a perfect fit or a perfect opportunity. He was very candid.”

Farrell was 154-170 in two seasons with Toronto. The Red Sox play the Blue Jays early next season, a three-game series in Toronto starting April 5.

The choice of Farrell was a popular one with Red Sox players. Jon Lester wrote, “Welcome back John!! Can’t wait to get back to work!!” on Twitter early Sunday morning.

“He has a great relationship with our pitchers and I think they need that,” Ortiz said. “If you can line up your pitching staff, it makes everything easier.

“I think [Farrell] will give us a chance to win games because the pitchers will produce for him. It was hard to win games last season because we were always behind. That’s a tough position.”

Ortiz believes the Red Sox also will benefit from Farrell being so familiar with the team.

“Definitely,” he said. “I’m pretty sure he’ll walk in and handle his business. He’ll be in a situation where he doesn’t have to come in and learn the program. He can just do his thing.”

The Red Sox have missed the playoffs three seasons in a row and were an embarrassment last season. There is much work to be done rebuilding the roster and hiring a coaching staff.

Hiring Farrell is the first step of many.

“I’m very excited to have him back and I’m looking forward to playing for him,” second baseman Dustin Pedroia said. “He’s been through it before here and it should be fun trying to accomplish our goals together.”