Novo-Dmitrovskoye (), a rural locality in Vyshgorodok volost, Ostrovsky Uyezd, Pskov Governorate, had been known since the end of the 18th century. In the last quarter of the 19th century, it had a population of 59. It grew significantly after gaining a railway station by a newly constructed railway branch. In February 1918 the German Army advances on Pskov and Petrograd capturing Pytalovo until fall 1918, when the Red Army retakes it. In May 1919 г. advancing pro-czarist Russian North-Western Army of Gen. Nikolai Yudenich supported by Estonian and Latvian republican units recaptures westernmost part of the Pskov Governorate. The frontline as of noon the 1st of February 1920 was stipulated as the border demarcation line by the Latvian–Soviet Peace Treaty of 1920 between Latvian Republic and Russian Soviet Federative Socialist Republic. By the Latvian–Soviet Peace Treaty of 1920, a part of Ostrovsky Uyezd, including Pytalovo, was passed to Latvia. In 1925, Latvians renamed it Jaunlatgale, which it was known as until 1938, when the name was changed to Abrene. In 1933, it was granted town status. During the interwar period, it was the administrative center of Abrene District. After the annexation of Latvia by the Soviet Union in 1940, the town originally remained a part of the Latvian SSR. During World War II, the town was occupied by the German Army from July 5, 1941 until July 22, 1944 and administered as part of the Generalbezirk Lettland of Reichskommissariat Ostland. On January 16, 1945, the town and the surrounding areas were transferred to Pskov Oblast of the Russian SFSR and Pytalovsky District was established. At the same time, the town's original name (Pytalovo) was restored. Whether the region is historically Russian or Latvian became a highly politicized issue after Latvia restored its independence in 1991 and a border dispute erupted with Russia over the region. The Abrene District, constituting roughly 2% of Latvia's territory, was transferred to the Russian SFSR in 1945, but it had originally been a part of Russia and ceded to Latvia only a quarter century earlier, in 1920. Russian President Vladimir Putin infamously proclaimed in 2005 that Latvia "will get the ears of a dead donkey but not Pytalovo [Abrene]". The border dispute was not resolved until 2007, when a treaty between Latvia and Russia recognizing the existing border was signed. Administrative and municipal status Within the framework of administrative divisions, Pytalovo serves as the