Belarus has been inhabited since prehistoric times, and the first recorded settlements date back to the 6th century AD. The princes of Kiev ruled Belarus until the invasion of the Mongols in 1240, when most of its towns were destroyed. The region came under the control of powerful Lithuanians and, in 1386, under the Lithuanian-Polish Jagiellonian Dynasty. For centuries, the Poles and the Muscovites struggled bitterly over Belarus. In 1772, Catherine the Great gained control over part of the country, and, by 1795, Russia ruled all of Belarus. During the 19th and 20th centuries, the country again became a European battleground. Napoleon passed through Belarus--and fought there--in 1812, and the Germans fought the Soviets on Belarusian territory in World War I. Although a Soviet Socialist Republic was proclaimed in January 1919, fighting with Poland continued until 1921. Belarus suffered heavy losses in World War II, when some 2.2 million inhabitants perished. The postwar period saw a significant rebirth-- especially in the economic sphere. On August 25, 1991, Belarus declared its independence from the Soviet Union.