NATIONAL HARBOR, Md. — Red Sox president of baseball operations Dave Dombrowski approached Brian Cashman before Thursday morning’s Rule 5 Draft, always the last event of the annual winter meetings, and slung his arm around the Yankees’ general manager.

“The monster is back!” Dombrowski said.

Cashman smiled.

“Nice of you to stop and talk to us little guys,” he said.

There was an appropriateness to the moment, as the primary decision-makers for two long-time rivals engaged in some good-natured ribbing after dominating the 2016 winter meetings.

The Red Sox ruled the first part of the week — fully announcing themselves as all-in for 2017 by acquiring ace lefhander Chris Sale, reliever Tyler Thornburg and first baseman Mitch Moreland. The Yankees made their splash at the end, agreeing late Wednesday night to a five-year, $86-million deal for closer Aroldis Chapman.

advertisement | advertise on newsday

The contract, which won’t become official until the lefthander passes a physical, is the richest ever for a reliever. It demonstrated that the Yankees, while still keeping their eyes firmly fixed on the future with a farm system swimming in elite prospects, not exactly conceding 2017.

“I think we’re trying to be as careful in our decision-making process as we possibly can as we straddle that line of trying to be as good as we can be in ’17 and hopefully even better than that in ’18 going forward,” Cashman said after the Rule 5 Draft, in which the Yankees lost seven players not on their 40-man roster. “I think every decision we’re trying to make is with that in mind.”

The Yankees have the 16th pick in the 2017 draft, which they didn’t have to forfeit by adding Chapman. That, and the fact that he has proved he can deal with playing for a New York team, made him a desired pickup.

“Chap can handle New York. That was not in question. He proved that,” said Cashman, who did not directly confirm the signing because Chapman had not yet taken the physical. “[And] there’s an attractiveness to his availability in the marketplace because it didn’t have a draft pick attached to him, and we know him, and that’s why we focused on him a little bit more than others.”

Chapman, who posted a 2.01 ERA with 20 saves in 31 appearances with the Yankees before they traded him to the Cubs near the trade deadline, picked the Yankees over the Marlins. The Dodgers also had been involved but pulled out of the talks earlier Wednesday.

Yankees videos

The move is not without risk. Chapman, who will turn 29 on Feb. 28, relies on a fastball that consistently surpasses 100 mph and has been clocked as high as 105 mph. But bullpens and relievers are, to borrow an oft-used Cashman term, “volatile,” making this kind of investment precarious.

“It’s a volatile situation, but that’s the price of poker,” Cashman said. “If it takes a five-year deal and if we ultimately conclude a five-year deal with somebody, then it’s because obviously that’s what the marketplace bore.”

Chapman’s deal includes an opt-out clause after three years and a full no-trade clause in the first three years of the contract. The former was something Cashman didn’t want to include but felt compelled to give Chapman.

“I don’t like it. It’s just at the end of the day, I know that the competition that we were up with were giving opt-outs in year 1 and 2, so at least we were able to put it in year 3,” he said.

The addition of Chapman had the full backing and encouragement of managing general partner Hal Steinbrenner from the start.

advertisement | advertise on newsday

Cashman still has work to do on the roster, though he doesn’t have much money left to work with. At the start of the meetings, he added Matt Holliday — who also did not cost the Yankees a draft pick — for one year and $13 million to be the DH. Cashman would like to add a starting pitcher and/or further fortify the bullpen if possible.

“Do we have more needs? We have more needs,” said Cashman, who is expected to focus mostly on the trade market now. “The ability to execute as many things as possible is going to shrink if we conclude this because obviously we won’t have really that much to play with financially. But we still have more needs.”