Historians tend to identify the city with Voruta, a legendary capital of Mindaugas who was crowned in 1253 as King of Lithuania. The city was first mentioned in written sources in 1323, in letters of Grand Duke Gediminas that were sent to German cities and invited Germans and members of the Jewish community to settle in the capital city. In 1387, the city was granted city rights by Jogaila, one of Gediminas' successors.