During the last year of World War I, from February to December 1918, the county's capital, Pechory, was occupied by German forces. As such, the county including the town and the territory surrounding it was devised to be part of the Baltic Duchy. The town was then captured by Estonian forces on March 29, 1919, during the Estonian War of Independence. The Treaty of Tartu of 1920 subsequently assigned Pechory and its surrounding territory, the Setomaa region, to Estonia. Pechory was renamed Petseri and the area became Petseri County. Saint Peter's Lutheran Church was built in 1926 at Petseri.