The deal includes an early termination option after the fourth year.
Veteran center Robin Lopez also reached agreement with the Wizards on Friday.
At 6-foot-10, Bertans is a towering sharpshooter with excellent range.
A second-round pick in the 2011 NBA draft, he made his NBA debut with the San Antonio Spurs in the 2016-17 season. The Wizards acquired Bertans in a three-team trade before last season.
While he was always an accurate shooter with the Spurs, the "Latvian Laser" was unleashed in Washington. Bertans jacked 8.7 3-pointers in 29.3 minutes per game last season, knocking them down at a 42.4% clip.
Bertans, 28, is a threat to pull up from anywhere. He made 12 of 23 shots (52.2%) from at least 30 feet last season, according to Second Spectrum tracking. Out of the 230 individual seasons over the past seven seasons in which a player has attempted at least 10 shots from 30 feet out, Bertans is the only player to make more than half of them.
He is also just the third player 6-10 or taller to make at least 200 3-pointers in a season, joining Peja Stojaković and Rashard Lewis.
Bertans took to Instagram to talk about staying in D.C.
Bertans averaged 15.4 points and 4.5 rebounds for the Wizards last season.
Lopez declined his $5 million player option for the 2020-21 season to become a free agent. He spent the 2019-20 season with his twin brother, Brook, in Milwaukee. He averaged 5.4 points, 2.4 rebounds and 14.5 minutes in 66 games (five starts).
Lopez, 32, is entering his 13th NBA season, with previous stops in Phoenix, New Orleans, Portland and New York.