NEW YORK (CBSNewYork) — Sonny Gray will soon be wearing pinstripes.

The Yankees and A’s agreed on a trade Monday that will send the right-handed ace to the Bronx. The Yankees, who also will receive international bonus pool money in the deal, are giving up three prized prospects — outfielder Dustin Fowler, infielder/outfielder Jorge Mateo and right-handed pitcher James Kaprielian.

News of the deal broken about an hour before Major League Baseball’s 4 p.m. non-waiver trade deadline.

While general manager Brian Cashman has been active in upgrading the Yankees’ roster in recent weeks, he also had repeatedly said he didn’t want to gut the franchise’s loaded farm system to chase a title this year. The price for Gray was not cheap, but Cashman did manage to hold on to six of the organization’s top seven prospects, including Gleyber Torres and Clint Frazier.

Sonny Gray

Sonny Gray of the A’s pitches against the Tampa Bay Rays on July 19, 2017, at Oakland Alameda Coliseum in Oakland, California. (Photo by Ezra Shaw/Getty Images)

It appears Cashman may have felt some pressure from within the organization to acquire an ace such as Gray, whose scheduled start for Sunday was pushed back, a sign that a trade was possibly imminent.

MORE: Palladino: Young Yankees Have Learned From Their Struggles

According to the Daily News’ John Harper, who cited a person close to the situation, the “decision-makers in the Yankees organization” want to “seize the moment.” New York is 56-47 and has a half-game lead over the Red Sox in the American League East.

“Starting with (owner) Hal (Steinbrenner), there’s a feeling this is a great opportunity that nobody wants to take for granted,” Harper’s source said.

The Astros, Dodgers, Brewers, Braves and Cubs also had reportedly expressed interest in Gray, who is 6-5 with a 3.43 ERA this year. The 27-year-old, one-time All-Star is under team control for the next two seasons.

On Sunday, the Yankees acquired left-hander Jaime Garcia from the Twins in exchange for minor league pitchers Dietrich Enns and Zack Littell. Earlier this month, the Bombers added relief pitchers David Robertson and Tommy Kahnle and third baseman Todd Frazier for outfield prospect Blake Rutherford, veteran reliever Tyler Clippard and two other minor leaguers.

Manager Joe Girardi now has to make a decision about the Yankees’ rotation, where he has six viable options — Gray, Garcia, Masahiro Tanaka, CC Sabathia, Luis Severino and rookie Jordan Montgomery.

Fowler was the Yankees’ fourth-ranked prospect and 77th-ranked prospect in all of baseball, according to MLB.com. An 18th-round draft pick in 2013, Fowler, 22, suffered a season-ending knee injury in the first inning of his big-league debut last month when he ran into a wall chasing a foul ball at the White Sox’s Guaranteed Rate Field. Prior to that, Fowler hit .293 with 13 homers and 43 RBIs in 70 games for Triple-A Scranton/Wilkes-Barre.

Mateo was once considered the top prospect in the Yankees’ system, but was eighth in the most recent MLB.com rankings. Signed in 2012 as an international free agent out of the Dominican Republic, Mateo, 22, split time between High-A and Double-A this season, batting .258 with eight homers and 37 RBIs.

“I would like to thank the Yankee organization for the opportunity they gave me,” Mateo wrote on Twitter on Monday. “I also want to thank all the Yankee fan for there (sic) support.”

Kaprielian, 23, a first-round draft pick in 2015, was the No. 12 prospect in the Yankees’ system. However, his season was cut short after undergoing Tommy John surgery in April. He played in just three minor league games in 2016 due to a flexor tendon injury.

In another trade Monday, the Yankees sent right-handed minor league pitcher Yefry Ramirez to the Orioles in exchange for international signing bonus pool money.

More From CBS New York

CELEBRATING 50 YEARS
Get Our Morning Briefs
Bloomberg WCBS Tri-State Business Index

Watch & Listen LIVE