Boston fired Farrell on Wednesday after the team’s second straight loss in the AL Division Series.

The Red Sox announced the move less than 48 hours after they were eliminated from the World Series hunt with a 5-4 loss to the Houston Astros. Farrell’s contract had been scheduled to run through the 2018 season.

Boston won back-to-back American League East titles for the first time in franchise history this season despite losing the bat of retired slugger David Ortiz. It also did it despite starting the season with $217 million pitcher David Price on the disabled list and watching as 2016 Cy Young Award winner Rick Porcello stumbled to an 11-17 record.

“I thought it was the appropriate time to make a change for the betterment of the organization,” said Dave Dombrowski, president of baseball operations.

Farrell managed the team to its eighth World Series title in 2013, his first season in charge of the club.

Farrell went 432-378 over five seasons with Boston. He began his coaching career with the Red Sox as a pitching coach from 2007-2010. Farrell also was part of the team’s 2007 World Series title. He began his major league managerial career with Toronto and went 154-170 over two seasons.

“Despite an end to this season that we all wanted to be different, I am proud of this ballclub and the resiliency shown,” Farrell said in a statement released by the Red Sox. “I have enjoyed every moment of this job — its peaks and its valleys. There are few, if any, positions in life that create so much passion on a daily basis.”

He also thanked the organization for its support “through a challenging and scary period in my own life,” referring to when he was diagnosed with lymphoma in 2015.

“I remain forever indebted,” said Farrell.

Dombrowski wouldn’t go into specifics on his thought process, but said “a lot of different factors” went into the decision to make the move. He said the team plans to move swiftly on its next hire and that the next manager would “most likely not” be a member of Farrell’s current coaching staff.

Dombrowski said it would be important to be comfortable in front of media and relatable to the team’s current young core.

Farrell leaves with a win total that ranks sixth in club history and he is second in postseason appearances (three) behind Terry Francona (five). He is also the only manager in in club history to finish in first place in the division three times.

“I think you can weigh success in a lot of different ways and that’s very successful… For me, the ultimate success is winning the world championship,” Dombrowski said.

Farrell said after losing to the Astros that the team didn’t meet its goals but had some good young players continue to develop.

“We had a number of challenges thrown our way from individual injuries to performance,” he said. “But as a team they stuck together.”

The offense slumped after Ortiz retired, even though the team had baseball’s third-highest payroll. Several players also had health issues, including second baseman Dustin Pedroia and pitcher Drew Pomeranz.

There also was an off-field incident in June when Price confronted Hall of Fame pitcher and current television analyst Dennis Eckersley on a team flight.

Price was upset Eckersley didn’t make himself available to the players after what they felt were critical comments about the team. Farrell later said the team had “moved on” from the incident, but the way it lingered raised questions about his control of the clubhouse .

Dombrowski reiterated that the organization was past that incident and said his personal relationship with Price is “fine.”

But Dombrowski conceded that being able to thrive as a manager under Boston’s unrelenting spotlight is a must. He said he’s talked to quality managers in the past that he respects that won’t manage in Boston.

It will make his search tougher, but he believes he can find the right person.

“You have to be prepared to take it,” Dombrowski said. “This is a great baseball city. …But there’s a lot of scrutiny. …I think it’s for some people and it’s not for others.”

Boston Mayor Marty Walsh weighed in on Dombrowski’s decision, blaming Farrell’s demise on the lack of talent on his roster.

“It’s the players. The players play and managers manage,” Walsh told 7News.

(Copyright (c) 2017 Sunbeam Television. The Associated Press contributed to this report. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)