In 1147, when Moscow was mentioned in Russian history for the first time, it was a part of the principality of Suzdal'; the date of its foundation is unknown. The little village developed into a sprawling city and in 1295 it became the capital of the newly established principality of Moscow. Growth was especially rapid during the first half of the 14th century, a period marked by sharp expansion of the power and wealth of the principality. In 1325 the metropolitan of the Russian Orthodox church transferred his seat to Moscow, making the city the national religious capital. It became the national political capital during the reign (1462-1505) of Grand Duke Ivan III Vasilyevich, who unified the Russian principalities. The seat of the Russian government was moved from Moscow to Saint Petersburg in 1712.
Moscow has survived many disasters, including fires, plagues, riots, revolts, sieges, and foreign occupation. In September 1812, during the Napoleonic Wars, the city was occupied by the armies of Napoleon. Russian patriots set fire to the city soon after his entry; the resultant French withdrawal from Russia led to Napoleon's downfall. The Moscow populace played major role in the Revolution of 1905 and the Revolution of 1917. In 1918 the new government of Russia moved to Moscow, and in 1922 the city was officially made the Soviet capital. Large sections of the city were rebuilt and modernized after the Bolshevik victory. In December 1941, during World War II, powerful German armies were decisively repulsed at the approaches to Moscow. In 1991 the city was the hub of the discussions and confrontations that led to the dissolution of the USSR, and in 1993 was the site of an armed clash between the forces of President Boris Yeltsin and conservative legislators. More than 140 people died in the uprising before Yeltsin's government reclaimed control.