The Boston Red Sox have hired Houston Astros bench coach Alex Cora as their new manager, the team announced Sunday.

Cora was signed to a three-year contract with a team option for 2021. He replaces John Farrell, who was fired on Oct. 11 after Boston was eliminated in the first round of the American League playoffs for the second year in a row.

Cora, 42, will not be introduced to the media as Boston’s manager until after the World Series. The Astros will play the Los Angeles Dodgers in the World Series starting Tuesday.

“I am extremely honored and humbled to be named manager of the Boston Red Sox and I want to thank Dave (Dombrowski), John Henry, Tom Werner, and Sam Kennedy for giving me such a tremendous opportunity,” Cora said in a Red Sox news release.

“Returning to the Red Sox and the city of Boston is a dream come true for me and my family and I look forward to working towards the ultimate goal of winning another championship for this city and its great fans.”

Dombrowski, in the news release, said, “We were very impressed when we interviewed Alex. He came to us as a highly regarded candidate, and from speaking with him throughout this process, we found him to be very knowledgeable, driven, and deserving of this opportunity. He is a highly respected and hardworking individual who has experience playing in Boston.

“Alex also has a full appreciation for the use of analytical information in today’s game and his ability to communicate and relate to both young players and veterans is a plus. Finally, the fact that he is bilingual is very significant for our club.”

Cora, a native of Puerto Rico, played parts of four seasons with the Red Sox from 2005-08. He will become the franchise’s 47th manager, and its first Hispanic manager.

He takes over a team that won the AL East each of the past two seasons, finishing with a 93-69 record both years.

Cora played 14 years in the major leagues before retiring in 2011, and was a member of Boston’s 2007 World Series champions. An infielder, Cora was a lifetime .243 hitter with 35 homers and 286 RBI.

While the Astros job is his first coaching position in the major or minor leagues, Cora has managed in the Puerto Rican winter league. He also managed Puerto Rico in the World Baseball Classic last spring.

Before joining the Astros this season, Cora was an analyst for ESPN.

“Alex is a guy that communicates well with the players; he’s a guy that studies the game,” Astros designated hitter Carlos Beltran told the Associated Press earlier this month. “His preparation is above what I have seen in baseball, and he has a great personality.

“He’s intense – players like to see it. But at the same time, he is a guy that can sit down in the clubhouse with the players and have a baseball conversation,” Beltran said. “So he’s got the skills and I love it. He’s been a big help for this organization. He takes a lot of pride into relationships with the players.”

Dombrowski earlier said that the new Red Sox manager would get to choose his own coaching staff. It is unclear whether any of Boston’s 2017 coaches will be retained, including third base coach Brian Butterfield, a Maine native and Standish resident.