Washington is receiving pitcher Clayton Beeter and outfielder Browm Martinez as part of the deal.
Rosario is slashing .270/.310/.426 on the year with five home runs and 18 RBI. The 29-year-old is currently on a one-year, $2 million deal that'll make him an unrestricted free agent at the end of the season.
But the righty provides a great bat for the Yankees, hitting .299 this season against lefty pitchers with an .816 OPS.
Rosario is a career .273 hitter in 988 games. The nine-year veteran can play anywhere across the infield but has primarily served as the Nationals' third baseman and second baseman this season.
Beeter has just two appearances for the Yankees this season, giving up six runs in 3.2 innings (14.73 ERA). However, Beeter was looking great in Triple-A before his call-up, throwing a 3.10 ERA in 18 games with 33 strikeouts and 17 hits in 20 innings pitched.
Meanwhile, the 18-year-old Martinez is currently slashing .404/.507/.632 with three home runs, 16 RBI, and 13 stolen bases through 18 games of ball in the Foreign Rookie League.
The Yankees are currently trying to battle back for the top spot in the American League East division with a 56-48 record, sitting 6.5 games back of the Toronto Blue Jays.
As for the Nationals, they currently sit at the bottom of the National League East division with a 42-62 record as they continue to rebuild.