The 6-foot-10, 225-pound Bertans ranked sixth in the NBA last season in 3-point shooting percentage, making 42.9 percent of his attempts. He averaged 8.0 points and 3.5 rebounds for San Antonio.
Bertans was a second-round draft pick in 2011, but the Latvian played professionally in Europe until joining San Antonio in 2016. His brother, Dairis, is with the New Orleans Pelicans.
Carroll agreed to a $12 million, two-year contract with the Spurs.
The Wizards sent the draft rights to forward Aaron White to Brooklyn in the trade. Washington took White in the second round in 2015 and he has been playing overseas.
Washington announced the swap after new league year officially opened Saturday.