bishop's fortress.
In the 1280s Dorpat joined the Hanseatic League. In medieval times Tartu was an important trading city. As in all of Estonia and Latvia, the largely German-speaking nobility, but in Tartu/Dorpat (as in Tallinn) even more so, the Baltic German bourgeoisie, the literati, dominated culture, religion, architecture, education, and politics until the late 19th century. For example, the town hall of Dorpat was designed by an architect from Rostock in Mecklenburg, while the university buildings were designed by Johann Wilhelm Krause, another German. Many, if not most, of the students, and more than 90% of the faculty members were of German heritage, and numerous statues of notable scientists with German names can still be found in the city today. Most Germans left during the first half of the 20th century, in particular as part of the Heim ins Reich program of the Nazis in 1939.
Polish–Lithuanian and Swedish rule
During the Livonian War in the 16th century, southern parts of the Livonian Confederation and Tartu fell under rule of the Grand Duchy of Lithuania, later the Polish–Lithuanian Commonwealth within the Dorpat Voivodeship of the Duchy of Livonia. A Jesuit grammar school was established in 1583. In addition, a translators' seminary was organized in Tartu and the city received its red and white flag from the Polish king Stephen Bathory.
The activities of both the grammar school and the seminary were stopped by the Polish–Swedish War (1601). Tartu then became Swedish in 1629, which led to the foundation of the university in 1632 by King Gustavus Adolphus of Sweden.
Imperial Russia
With the Treaty of Nystad in 1721, the city became part of the Russian Empire and was known as Derpt. Due to fires in the 18th century which destroyed much of the medieval architecture, the city was rebuilt along Late Baroque and Neoclassical lines