History of Vilnius

Vilnius is the capital of Lithuania.
Early history.
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.
Polish-Lithuanian Commonwealth period.
Between 1503 and 1522 the walls were built to protect the city, and at the time it had nine city gates and three towers. Vilnius reached the peak of its development under the reign of Sigismund August, who moved his court there in 1544. In the following centuries, Vilnius became a constantly growing and developing city. This growth was due in part to the establishment of Almae Academia et Universitas Vilnensis Societatis Jesu by the King Stephen Bathory in 1579. The university soon developed into one of the most important scientific and cultural centres of the region and the most notable scientific centre of the Polish-Lithuanian Commonwealth. Political, economic, and social activities were in full swing in the town. In 1769, the Rasos Cemetery, one of the oldest surviving cemeteries in the city, was founded. During its rapid development, the city was open to migrants from both abroad and far reaches of territories of Grand Duchy of Lithuania. Each group made its unique contribution to the life of the city, and crafts, trade and science prospered. During the Russo-Polish War (1654–1667), Vilnius was occupied by Russia for several years. The city was pillaged and burned, and its population was massacred. The city's growth lost its momentum for many years, but the population rebounded, and by the beginning of the 19th century city's population reached 20,000, making the city one of the largest in Northern Europe.
In Russian Empire.
After the Third Partition of the Polish-Lithuanian Commonwealth in 15 April 1795, Vilnius was annexed by Russian Empire and became the capital of a Vilna Governorate. During the Russian occupation the city walls were destroyed, and by 1805, only the Dawn Gate remained. In 1812, the city was seized by Napoleon on his push towards Moscow. Following the November Uprising in 1831, Vilnius University was closed and Russian repressions damaged the development of the city. During the January Uprising in 1863 heavy fighting occurred within the city, but was brutally pacified by Mikhail Muravyov, by the population because of the number of executions he organized. After the uprising, all civil liberties were withdrawn, and use of the Polish and Lithuanian languages was banned. in early 20th century Lithuanian speaking population constituted only a small minority then, with Polish, Yiddish, and Russian speakers being most of the population of the city. 
In Poland.
During World War I, Vilnius – as with the rest of Lithuania – was occupied by the German Empire from 1915 until 1918. The "Act of Independence of Lithuania", that restored Lithuanian independence from any affiliation to any other nation was proclaimed in the city on February 16 1918. After the withdrawal of German forces, Lithuanian forces were forced to retreat by advancing Russian occupation forces. Vilnius changed hands many times: for a while it was controlled by Polish self-defence units, who didn't want the city to be occupied by Russian-Bolshevik forces. Then the Polish Army regained control, then Soviet forces again. Shortly after its defeat in the Battle of Warsaw (1920), the retreating Red Army ceded the city back to Lithuania by signing a peace treaty on July 12, 1920. On October 9 of the same year, the Polish Army under General Lucjan Żeligowski broke the treaty and seized Vilnius after a staged coup. The city and its surroundings were proclaimed as the separate state of Central Lithuania. On February 20 1922 after an elections, the whole area was attached to Poland, with the city as the capital of the Wilno Voivodship (Wilno being the name of Vilnius in Polish). The predominant languages of the city were still Polish and, to a lesser extent, Yiddish.