BOSTON (AP)Red Sox manager Alex Cora had a sense Rafael Devers would be sticking around when the rough terms of a new deal were discussed during a high-level meeting in the Dominican Republic.

”I wanted to be there, just to hear when somebody tells you that you’re going to make all this money,” Cora said on Wednesday, when the team announced a 10-year deal that will pay Devers $331 million through 2033.

”His reaction was great. He was priceless,” Cora said. ”His eyes got as big as when he sees a fastball right down the middle.”

Burned by the departures of Mookie Betts and Xander Bogaerts, the Red Sox finally held onto a homegrown All-Star, locking Devers up before he would have had a chance to become a free agent after the upcoming season. Team President Sam Kennedy said the 10-year agreement is ”a deal that we hope will keep him a Red Sox forever.”

”He’s not just a star: He’s our star,” Chief Baseball Officer Chaim Bloom said. ”It’s a wonderful thing to retain a homegrown player who loves Boston, and Boston … loves back.”

A two-time All-Star who first signed with the Red Sox as a 16-year-old, Devers he has batted .283 with 139 home runs and 455 RBIs since being called up in 2017 at the age of 20. Over the past three seasons, he leads the majors with 149 doubles and 264 extra-base hits.

The Red Sox avoided arbitration this year by signing him to a one-year, $17.5 million deal. But he would have been eligible for free agency after the season, and that prospect was something that the Red Sox and their fans did not want to think about after seeing Betts traded in 2020 and Bogaerts walk last month.

So the team’s brain trust – including Bloom, Kennedy, Cora and owner John Henry – met with Devers and his agents at the player’s Dominican home in mid-December.

”My thought was they wouldn’t come all the way down to the Dominican Republic for no reason,” said Devers, who – unlike Betts and Bogaerts – had no desire to test the market. ”Free agency isn’t easy. It’s a tough process and I just didn’t want to go through this.”

The final terms were hashed out on Dec. 31.

”I hope next year during the holidays we spend less time talking to each other,” Bloom said. ”They’re great guys, but it’s not how I want to spend next New Year’s Eve.”

Although Bloom had entered the offseason saying his No. 1 goal was to re-sign Bogaerts, that shifted after the All-Star shortstop signed a $280 million, 11-year deal with the Padres. Red Sox Chairman Tom Werner said on Wednesday that signing Devers was ”obviously an urgent priority.”

”We think his best years are even ahead of him because he’s in his mid-20s,” said Werner, whose presence at the news conference snapped a three-year general media availability drought for Red Sox ownership. ”We did not want Raffy to become a free agent next year, and we’re delighted.”

If Devers plays out the contract, which would take him through his 37th birthday during the 2033 World Series, he would be a member of the Red Sox for 17 seasons, tying Tim Wakefield and trailing only Carl Yastrzemski (23), Dwight Evans (19) and Ted Williams (19).

Now 25, Devers thanked the Red Sox and their fans, ”who adopted me since I was 16.” He promised that the long-term contract wouldn’t change him.

”That will never happen,” he said through a translator. ”I just want to be the same guy that I’ve always been. Someone who has fun, enjoys the games and who is approachable.”

The Devers deal was a rare bit of good news this offseason for the Red Sox, who followed a last-place finish by losing not just Bogaerts as a free agent but also J.D. Martinez, Christian Vazquez, Nathan Eovaldi and Rich Hill. On Tuesday, the team revealed that Bogaerts’ likely replacement at shortstop, Trevor Story, will miss most or all of the season recovering from elbow surgery.

Bloom asked fans to be patient.

”What we always talk about is … consistently contending for championships. I’m hoping that vision’s a little bit clearer here today, knowing that this guy’s going to be right in the middle of it,” he said, nodding toward Devers.

”We’ve taken a couple of haymakers; you know what, we’re probably going to take a couple more. This is baseball. It’s not supposed to be easy,” he said. ”But I want to be clear: We’re going to do this, and it’s going to be awesome. And we are going to get there.”

NOT FOR SALE

Also Wednesday, Werner said that Red Sox ownership is not looking to sell the team. Fenway Sports Group, which owns the baseball team along with the NHL’s Pittsburgh Penguins, Liverpool of the English Premier League and the Roush Fenway Keselowski NASCAR team, has said it is open to new investors in the soccer club.

The money would be used for new investments, with an NBA franchise at the top of the wish list.

”There are absolutely no plans” to sell, Werner said. ”I’m 72. John is 72. We have a desire to win many more World Series here. As long as we’re healthy, we’re going to be hoepfully improving the stewardship of the Red Sox. … Our heart and soul is with the Red Sox.”

TRADED

The Red Sox traded left-hander Darwinzon Hernandez to the Baltimore Orioles for cash on Wednesday. He had been designated for assignment on Jan. 6 to open a roster spot for infielder Justin Turner.

Hernandez, 26, has a 3-4 record and a 5.06 ERA in 91 appearances over parts of four seasons with the Red Sox.

AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports