In 1704 the town was taken by the Russian army in the presence of tsar Peter the Great himself. As a result, around a quarter of the town and much of the fortifications were damaged. In 1708 the remainder of the fortifications and houses, including the remains of bishops castle, were blown up, all movable property was looted and all citizens deported to Russia. With the Treaty of Nystad in 1721, the city became part of the Russian Empire and was known as "Derpt". Fires in the 18th century destroyed much of the medieval architecture, the Great Fire of Tartu in 1775 removed most of the buildings in the centre. The city was rebuilt along Late Baroque and Neoclassical lines including the Tartu Town Hall which was built between 1782 and 1789. In 1783 the city became the centre of Derpt uyezd within the Governorate of Livonia.