The New York Yankees and St. Louis Cardinals have agreed to a last-minute deal ahead of the MLB trade deadline. The Yankees have agreed to trade starting pitcher Jordan Montgomery to the Cardinals in exchange for outfielder Harrison Bader. Mark Feinsand of first reported the deal.

New York also acquired a player to be named later in the deal. The Yankees, who already acquired outfielder Andrew Benintendi from the Kansas City Royals, further add to their depth.

Meanwhile, the Cardinals bring another much-needed starter to the mix. While they did add Jose Quintana, St. Louis struck out on the likes of Luis Castillo and Frankie Montas. It was important for them to get another impact arm.

Montgomery, who has pitched to a 3.69 ERA with 97 strikeouts in 114 2/3 innings, can be just that for the Cardinals as they make a postseason push. He’ll help provide stability behind the likes of Miles Mikolas and Adam Wainwright.

As for the Yankees, Harrison Bader, who is batting .256 with 15 stolen bases on the year, adds a couple of important dynamics to the Yankees order. A fine defender, Bader can handle plenty of innings in center field, which will keep MVP candidate Aaron Judge healthy as the season wears on.

Bader’s speed will also play nicely in a Yankee lineup that has largely been devoid of it in recent years. It’s rare to see two contenders come together to make an MLB trade deadline deal.

However, you’d be hard-pressed to find a deal that works as good as this one does for both sides.