Out with the old and in with the older.

In an effort to improve defensively, the Mets finalized a trade Sunday night that sent Brandon Nimmo to Texas for second baseman Marcus Semien, according to industry sources.

Semien, 35, still has $72 million remaining on a contract that runs for the next three seasons. Nimmo, who turns 32 in March, is still owed $102 million on a contract that extends for the next five seasons. Nimmo waived his no-trade clause, allowing the deal to proceed. The Mets will also send $5 million to Texas.

Nimmo’s subtraction could serve as an indicator that the Mets plan to pursue Kyle Tucker or Cody Bellinger, both of whom are free agents, for the outfield. Both, like Nimmo, are left-handed hitters.

Semien’s addition also strongly suggests the Mets will trade Jeff McNeil, who has served primarily as a second baseman. McNeil also can play the outfield. Semien, a right-handed hitter, overlaps with Luisangel Acuña, a defense-first player with speed.

Brandon Nimmo has spent all 10 of his MLB seasons with the Mets. AP

Semien produced only a .230/.305/.364 slash line with 15 homers and 62 RBIs in 127 games for the Rangers last season, but won his second career Gold Glove. Semien, according to Statcast, recorded seven outs above average, placing him in MLB’s 92nd percentile for range. Semien also rated among the game’s best base runners.

The trade for Semien is not surprising in the context of president of baseball operations David Stearns’ reaffirmation at the general managers meetings that defensive improvement would be a focal point this offseason.

“The first thing is the recognition [defense] is as important as offense,” Stearns said two weeks ago. “We have a tendency in this game — it’s not just the Mets, it’s everywhere, because offense is much easier to see and scoring runs is so much easier seen, in some ways much more easier to measure than preventing runs, especially defensively, that it becomes, ‘We need to focus much of our training time and efforts and energy on how can I get better offensively.’ And at times we forget about the other side of the ball.”

Brandon Nimmo reacts after hitting a home run during the Mets’ Sept. 18 game against the Padres. Jason Szenes for the NY Post

Nimmo, the longest-tenured Mets player — he debuted with the club in 2016 after he was drafted into the organization five years earlier as a first-round pick — produced a .262/.324/.436 slash line with 25 homers and 92 RBIs last season.

A popular player with the fan base because of his affability, Nimmo had spoken openly about his desire to play his entire career with the Mets and finish among the franchise’s all-time leaders in games played.

Marcus Semien is pictured in 2023. USA TODAY Sports via Reuters Con

With the Rangers, he will be reunited with Jacob deGrom, who won two Cy Young awards with the Mets before leaving as a free agent.

Nimmo’s departure follows a Mets nosedive that prevented the club from reaching the playoffs.

Even so, the Mets would have qualified for the NL’s third wild card with a victory in the regular-season finale, but lost in Miami, allowing the Reds to clinch the berth.

The Mets still have a significant issue to resolve regarding first base following Pete Alonso’s opt-out. Alonso’s defense has been a concern, but it’s also possible that he would shift to DH if he were to return to the Mets.

Delivering insights on all things Amazin’s

Sign up for Inside the Mets by Mike Puma, exclusively on Sports+

Thank you

The Mets also face a big decision on Edwin Díaz following his opt-out with two years and $37 million remaining on his contract. Díaz recently put his chances of a Mets return at “50-50.” The question is whether Stearns is willing to give four or five years to a closer who will turn 32 during spring training.