The city of Moscow gradually grew around the Moscow Kremlin, beginning in the 14th century. It was the capital of the Grand Duchy of Moscow (or Muscovy) and then the Tsardom of Russia until the capital was moved to Saint Petersburg by Peter the Great. Moscow was the capital of the Russian Soviet Federative Socialist Republic from 1918, which then became the Soviet Union (1922 to 1991), and since 1991 has served as capital of the Russian Federation.