From the Vilnius Historic Centre World Heritage inscription:
The Vilnius Historic Centre began its history on the glacial hills that had been intermittently occupied from the Neolithic period; a wooden castle was built around 1000 AD to fortify Gedimino Hill, at the confluence of the Neris and Vilnia rivers. The settlement did not develop as a town until the 13th century, during the struggles of the Baltic peoples against their German invaders. By 1323, when the first written reference to Vilnia occurred, it was the capital of the Grand Duchy of Lithuania. At this time, some brick structures had apparently been erected on a small island formed when the Vilnia changed its course. By the 15th century, the Grand Duchy of Lithuania, with its capital Vilnius, had become the largest country in Europe, stretching from the Baltic Sea in the North to the Black Sea in the South.