OAKLAND (CBS SF) — As the clock ticked down to Monday’s trading deadline, the Oakland Athletics traded young ace Sonny Gray to the New York Yankees for three prospects.

Oakland gets right-hander James Kaprielian, a former first-round draft pick recovering from Tommy John surgery; Jorge Mateo, a top prospect who plays shortstop and the outfield; and Dustin Fowler, an outfielder who made his major league debut in June. New York also receives $1.5 million in international signing bonus allocation from the A’s.

The Athletics had pushed back Gray’s next scheduled start. He was supposed to pitch Sunday against Minnesota, but was set to throw against San Francisco on Monday night.

The 27-year-old right-hander is 6-5 with a 3.43 ERA. He’s 4-2 with a 1.38 ERA over his last six starts.

Dealing Gray was the second A’s trade of the day, earlier they sent infielder Adam Rosales to the Arizona Diamondbacks for minor league right-hander Jeferson Mejia.

Rosales, who filled in at shortstop for 36 of the 38 games when starter Marcus Semien was hurt this season, is no stranger to switching teams. And the last-place A’s are dealing again for prospects as they have historically done.

During an 11-day span late in the 2013 season, Rosales was claimed off waivers by Texas from Oakland, went back to the A’s off waivers from the Rangers and then returned to Texas once again on waivers only to watch his former team win the AL West without him.

Rosales was batting .234 with four homers and 27 RBIs in 71 games. The 22-year-old Mejia was 1-1 with a 6.08 ERA in 18 relief appearances Class A Kane County before going to Class-A short season Hillsboro, where he made three relief outings.