The Yankees shipped relief pitcher Joely Rodriguez to the Mets. Vincent Carchietta-USA TODAY Sports

The New York Yankees and New York Mets on Sunday agreed to do some rare business.

The sides traded a pair of relief pitchers, with right-hander Miguel Castro going to the Bronx and left-hander Joely Rodriguez headed to Queens.

The swap marks just the fourth time the crosstown rivals have completed a trade with each other since 2004 and only the 16th time since 1966.

The last trade between the two occurred on April 10, 2018, when minor leaguers Kendall Coleman and L.J. Mazzilli were dealt for each other.

In 2004, another pair of relievers were swapped. The Yankees sent three-time World Series champion Mike Stanton to the Mets for Felix Heredia.

In 2001, David Justice went from the Bronx to Queens for Robin Ventura. While Justice was flipped days later to the Oakland Athletics, Ventura hit 27 home runs on his way to an All-Star nod in 2002.

Rodriguez originally was acquired by the Yankees in last year’s Joey Gallo trade. He posted a 2.84 ERA with 17 strikeouts in 19 innings over 21 appearances for the Yankees. In November, the Yankees re-signed Rodriguez to a one-year, $2 million deal.

The Mets acquired Castro from the Baltimore Orioles during the shortened 2020 season. Castro went 1-2 with a 4.00 ERA in nine innings with the Mets that season. He had mixed results last season, posting a 3.45 ERA over 69 games.

More must-reads:

TODAY'S BEST
Former Dolphins receiving leader announces his retirement from NFL
Detroit Lions dominate PFF's top-25 players under 25
Hall of Famer, legendary Raiders offensive lineman dead at 86
Report: Cavs owner 'would never' trade Donovan Mitchell to this team
Kim Mulkey adds legendary LSU alum to coaching staff
Insider details LeBron James' role in Lakers' head-coaching search
Cardinals switch up offensive line, move 2023 first-rounder to new position
Commanders poach another key overseer of Lions rebuild
Commanders to hire veteran executive as player personnel director
Guardians designate outfielder for assignment
Patriots' Drake Maye starts OTAs in surprising position
Bettors are buying Bronny James hype before the 2024 NBA Draft
Mets release veteran infielder
Anderson Silva, Chael Sonnen will finish off their trilogy in a boxing ring
Victor Wembanyama, Chet Holmgren highlight 2023-24 All-Rookie team
Jaguars' Doug Pederson discusses Trevor Lawrence contract extension
Saints, star CB 'moving forward' following trade chatter
Pacers ride historic shooting performance to Game 7 blowout of Knicks
Timberwolves mount incredible second-half comeback to stun Nuggets in Game 7
Xander Schauffele proves doubters wrong with historic win at 2024 PGA Championship