Right-hander Gerrit Cole decided Monday to remain with the New York Yankees on the four-year, $144 million contract he opted out of Saturday, the team confirmed late in the day.

Originally, the only way Cole would remain a Yankee without reaching free agency was if the club voided his opt-out with a one-year, $36 million extension to his contract, making it a five-year, $180 million deal. The Yankees declined to do so, but they came to an agreement for Cole to remain in New York anyway, as if he had not triggered the opt-out in the first place.

“It was something at the moment we weren’t necessarily comfortable doing, but we wanted our player and our ace back, and he certainly didn’t want to go either at the same time,” Yankees GM Brian Cashman said Monday at the general managers meetings in Texas. “And so we had a lot of healthy dialogue about trying to just thread the needle and just keep it in play.”

The two sides originally had until Sunday to decide Cole’s fate, but they extended the deadline to Monday at 5 p.m. ET because the conversations were ongoing. Though the Yankees would love to have Cole finish his career in New York, Cashman indicated there are no current discussions on a potential contract extension, citing the timing of the end of the World Series as having played a part in the saga.

“Was a 48-hour window, very small,” Cashman said. “It feels like he legitimately just got off the mound and we were in our discussions. We were wrestling with [the decision] and sharing that [with Cole]. And at the same time, there is an opportunity that arose that Gerrit didn’t want to go anywhere either.”

Cashman was asked if the team had won a game of chicken with Cole and his representatives.

“No, I don’t look at it as anything other than more conversations we’re having after the opt-out than probably should have happened before the opt-out,” he answered. “And so I think it’s easier to try to understand and find common ground with each other when you’re having the conversations versus a contractual right you exercise and now the other side has to do things instead.”

In other words, the Yankees didn’t feel comfortable with making a fast decision right after the World Series and were ready to let Cole walk but instead offered to kick the discussions down the road.

Cashman had a layover in Charlotte on the way to San Antonio on Monday afternoon, realizing then that the sides were in a good place.

“It felt like we were going to be in a safe harbor where we were both willing to move forward with the four years that was in play and continue obviously to have conversations,” Cashman said. “But there’s no pressure point with any conversations. We’re always open to talk about future years, but right now we don’t have to because it’s a four-year locked-in commitment, and it’s on to our next focus.”

A six-time All-Star, the 34-year-old Cole fulfilled his boyhood dream of joining the Yankees before the pandemic-shortened 2020 season on what was, at the time, the largest contract ever given to a pitcher: nine years, $324 million. He became the workhorse ace New York envisioned, posting a 3.08 ERA in 108 starts over the next four seasons, and peaked in 2023, when he went 15-4 with a 2.63 ERA across 209 innings in 33 starts to win his first Cy Young Award. A repeat performance, however, was doomed from the start.

Cole was shut down in mid-March with nerve irritation and edema in his throwing elbow. He avoided surgery but began the season on the injured list. He made three rehab starts before making his season debut June 19 against the Baltimore Orioles. Initially not built up to his usual pitch count, Cole didn’t record an out in the sixth inning in his first four outings.

But the Yankees’ measured plan for Cole paid dividends. The right-hander ultimately logged at least six innings in eight of his 17 starts, posting a 3.41 ERA across 95 innings. He had his occasional blow-up — he surrendered 11 runs in two starts against the Boston Red Sox and 12 runs to the New York Mets in two outings — but was otherwise stingy, allowing two or fewer runs in 10 of his starts. He delivered his best performance in Oakland, holding the A’s to one run over nine innings Sept. 20.

Cole added another five starts in the postseason, pitching to a 2.17 ERA over 29 innings. He limited the Kansas City Royals to one run in seven innings in the Yankees’ American League Division Series-clinching Game 4 win. The Dodgers mustered just one run in six innings against him in Game 1 of the World Series, although the Yankees lost in extra innings.

His final start of the season in Game 5, however, will haunt the Yankees: After four hitless innings, three Yankees defensive miscues in the fifth — including Cole not covering first base on a routine ground ball to first baseman Anthony Rizzo with two outs — allowed the Dodgers to tie the score with five unearned runs in their eventual 7-6 win.

The Pittsburgh Pirates drafted Cole with the No. 1 pick in the 2011 draft out of UCLA. He made his major league debut in 2013 and made one All-Star team for Pittsburgh. It wasn’t until he was traded to the Houston Astros after the 2017 season that he became a consistent ace, recording two 200-plus-inning seasons with a 2.68 ERA before hitting free agency and signing with the Yankees in December 2019.

“I think he’s happy where he’s at,” Cashman said. “I think he likes our setup. I think he likes playing for who he’s playing for and working for. And I think he likes his teammates, and I think he thinks we have a legitimate chance to win. And sometimes the grass isn’t always greener, and so that goes for us, too. I know we’d prefer not to be trying to look to how we’re going to replace our ace.”