During the Great Northern War, Harju was one of the few regions in Estonia untouched by warfare for a long time. Nonetheless, Harju County was greatly affected by the 1710-1713 Plague that killed more than eighty percent of the county's population. Russian forces finally arrived in 1710 and laid siege to Tallinn for a month until the Swedish garrison surrendered, thus ending the Great Northern War in Estonia. Russian rule was secured with the Treaty of Nystad in 1721. The plague raged on for several years, eventually leaving several parts of the county completely empty of human habitation.