NEW YORK (AP)The Yankees acquired Gold Glove-winning center fielder Harrison Bader from the St. Louis Cardinals for left-hander Jordan Montgomery ahead of Tuesday’s trade deadline, a surprising deal aimed at improving defense.

A speedy 28-year-old from Bronxville, New York, Bader has not played since June 26 because of plantar fasciitis in his right foot.

When he returns, he likely would play share center field with newly acquired Andrew Benintendi in a move that would put Aaron Judge back in right and see Aaron Hicks and Benintendi share time in left, with Giancarlo Stanton as the designated hitter.

”Harrison Bader is one of the elite center-field defenders in the game,” general manager Brian Cashman said, anticipating Bader will return in September. ”So he provides a lot of lanes for us.”

New York, which acquired Benintendi from Kansas City last week, traded strikeout-prone outfielder Joey Gallo to the Los Angeles Dodgers earlier Tuesday for minor league right-hander Clayton Beeter.

Montgomery was 3-3 with a 3.69 ERA in 21 starts but was 0-2 with a 5.36 ERA in his last eight outings. His departure came one day after Frankie Montas was acquired from Oakland to join Gerrit Cole, Nestor Cortes and Jameson Taillon in the rotation.

”Pretty shocked I guess,” Montgomery said.

Domingo German likely will remain in the rotation in the absence of Luis Severino, who is out until at least mid-September because of a strained lat muscle in his right side. The Yankees appeared to conclude Montgomery would not be needed for a postseason start.

St. Louis obtained lefty Jose Quintana from Pittsburgh a day earlier.

”We wanted innings, specifically starting pitching,” Cardinals president of baseball operations John Mozeliak said. ”We felt like we were getting inconsistency out of our rotation.”

St. Louis also got catcher Austin Allen from Oakland on Tuesday for right-hander Carlos Guarate

In preparing for the stretch run and the playoffs, the AL-best Yankees also acquired righty relievers Scott Effross and Lou Trivino.

Bader is a graduate of Horace Mann School in the Bronx, about 5 miles from Yankee Stadium. He went to the University of Florida and was drafted by the Cardinals in the third round in 2015.

Bader made his big league debut two years later and hit .267 last year with 16 homers, 50 RBIs and nine stolen bases. His 15 defensive runs saved were 10th in the majors, according to the Fielding Bible, and he earned a National League Gold Glove.

Slowed by the foot injury this year, Bader is batting .256 with five homers, 21 RBIs and 15 steals. His defensive runs saved declined to minus-2.

Bader is in the first season of a $10.4 million, two-year contract that pays $4.7 million next year.

Montgomery, who could make his Cardinals debut against the Yankees this weekend, is 22-20 with a 3.94 ERA in six big league seasons. He was sidelined from May 2018 until September 2019 by an elbow injury that needed Tommy John surgery.

”I still don’t really think I’ve ever performed the way I should here,” Montgomery said. ”A lot better player than I’ve ever shown, but I think was consistent and definitely worked my hardest.”

Montgomery has a $6 million salary and is eligible for arbitration next winter. Both Bader and Montgomery are eligible for free agency after the 2023 season.

Allen was 1 for 14 this season for Oakland and hit .271 with five homers and 26 RBIs for Triple-A Las Vegas. Guarate, 21, is 5-4 with a 4.18 ERA in 12 starts and seven relief appearances for Class A Palm Beach.

Notes: New York optioned RHP Carlos Espinal to Triple-A Scranton/Wilkes-Barre and activated C Ben Rortvedt from the 60-day IL and optioned him to the RailRiders.

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