12:47 PM ET

The Mets sent right-handed pitcher Miguel Castro to the Yankees for left-handed pitcher Joely Rodriguez on Sunday.

Castro went 3-4 with 77 strikeouts and a 3.45 earned run rate in 69 appearances last season. He will make more than $2 million this season after signing a deal.

Rodriguez is a southpaw who will be used in the Mets' relief corps after the departure of Aaron loup.

Rodriguez, who was traded from Texas to the Yankees last season, had a 4.66 earned run average in 52 appearances. He went 1-0 with a 2.84 earned run average in 21 games for the Yankees after the trade. He is due $2 million this season.

The 18th deal between the franchises is the third since 2005. The Yankees acquired Gonzalez Germen from the Mets for cash in December 2014, and in April of last year, they got L.J. Mazzilli from the Yankees.