The city was first mentioned in written sources in 1323 as ''Vilna'', when the Letters of Grand Duke Gediminas were sent to German cities inviting Germans (including German Jews) to settle in the capital city, as well as to Pope John XXII. These letters contain the first unambiguous reference to Vilnius as the capital; Old Trakai Castle had been the earlier seat of the court of the Grand Duchy of Lithuania.