Vilnius first appeared in historical sources in a letter dated 25 January 1323 from Grand Duke Gediminas to the German civitas regia (“king’s realm”) cities. Around that time, a masonry castle was also built in Vilnius – one of the first masonry residences in the Grand Duchy of Lithuania. The city arose from the merging of three distinct communities: Lithuanian, German, and Russian.
However, the most important impetus for the development of the city was the Christianisation of Lithuania and its subsequent newly gained privileges. On 22 March 1387, Władysław II Jagiełło, King of Poland and Grand Duke of Lithuania, granted his capital city of Vilnius special German rights, also known as Magdeburg law. Thus, the phenomenon of European urban self-governance, which emerged in the Middle Ages and changed the history of most cities, reached Lithuania. Magdeburg law guaranteed individual and property rights to citizens, and administrative and judicial autonomy to the city community. The central location of the city was a town hall, where the municipal authorities (the council and the court) met, transactions were conducted, samples of measuring instruments were stored, and a wax refinery was established.
The introduction of self-governance greatly revitalised the development of the city and helped create a special self-awareness for the townspeople. At the beginning of the 16th century, the principle of “urban air makes you free” was already well-established in Lithuania. Different communities of townspeople (brotherhoods, workshops, guilds) formed based on examples from other European cities, combining the goals of professional, confessional, and social support and care.