MIAMI (AP) — The last-place Miami Marlins were sellers at the trade deadline, as usual, but kept a foundation for their future.

All-Star catcher J.T. Realmuto and closer Kyle Barraclough, both subjects of trade talk, were among those staying in Miami. The Marlins parted with right-handed reliever Brad Ziegler and outfielder Cameron Maybin, two well-traveled veterans who increased their market value by playing well lately.

Ziegler returned to his former team, the Arizona Diamondbacks, who bolstered their bullpen for the pennant race and gave up Double-A reliever Tommy Eveld. Maybin went to another contender, the Seattle Mariners, for minor league middle infielder Bryson Brigman and international slot money.

There had been considerable trade speculation regarding Realmuto, but instead he could now become the centerpiece in CEO Derek Jeter's rebuilding project, with the Marlins interested in a long-term contract.

Also staying are Barraclough, outfielder Derek Dietrich and first baseman Justin Bour. All were subjects of trade speculation in recent days, but none is on the verge of free agency.

The deals not made may signal a shift in direction under Jeter for a franchise long accustomed to constant roster turnover.

"We're building something," president of baseball operations Michael Hill said. "The controllable pieces we have in Miami, we're extremely happy to have them a part of the organization. They're definitely a part of what we're trying to build to be a consistently competitive organization. We knew there were some names out there that were popular, but in the end those players are still Miami Marlins, and we're excited that they are."

Realmuto has a $2.9 million salary and two years of arbitration to go. A long-term contract with Miami is now a possibility.

"At the appropriate time, I think it's something that will be discussed," Hill said.

Ziegler and Maybin weren't part of the Marlins' long-term plans.

The 38-year-old Ziegler is 1-5 with a 3.98 ERA this season. The sidewinder's ERA was 7.88 on June 1, but since then he has allowed two runs in 28 innings. He's in the final year of a $16 million, two-year contract, and the Diamondbacks will assume the remaining $2.95 million of his salary this year.

The 31-year-old Maybin is batting .251 with three homers and 20 RBIs in 99 games this season, but he's batting .329 with a .912 OPS since June 29. The Mariners are the seventh team for the 12-year veteran, who has a $3.25 million, one-year contract.

"We're very happy with deals we were able to make, maximizing the value of two expiring contracts," Hill said.

Eveld, a 24-year-old right-hander, has a 1.11 ERA in 35 games in the minor leagues this season. He's a native of the Miami area, played football at the University of South Florida and was a ninth-round draft pick by the Diamondbacks in 2016.

The 23-year-old Brigman is batting .304 this year for Single-A Modesto with 15 stolen bases. He was a third-round pick by the Mariners in 2016.

Eveld will be assigned to Double-A Jacksonville, and Brigman to Single-A Jupiter.

The Marlins optioned right-hander Ben Meyer to Triple-A New Orleans, returned from rehab and reinstated right-hander Tayron Guerrero, recalled right-hander Jarlin Garcia from New Orleans, and selected the contract of outfielder Isaac Galloway from New Orleans.

___

More AP baseball: https://apnews.com/tag/MLBbaseball