Saint Petersburg founded by Peter the Great
Saint Petersburg, formerly known as Petrograd (1914–1924) and later Leningrad (1924–1991; see below), is the second-largest city in Russia. It is situated on the Neva River, at the head of the Gulf of Finland on the Baltic Sea. The city had a population of roughly 5.6 million residents as of 2021. Saint Petersburg is the fourth-most populous city in Europe, the most populous city on the Baltic Sea, and the world's northernmost city of more than 1 million residents. As Russia's Imperial capital, and a historically strategic port, it is governed as a federal city.      
The city was founded by Tsar Peter the Great on 27 May 1703 on the site of a captured Swedish fortress, and was named after apostle Saint Peter. In Russia, Saint Petersburg is historically and culturally associated with the birth of the Russian Empire and Russia's entry into modern history as a European great power. It served as a capital of the Tsardom of Russia, and the subsequent Russian Empire, from 1713 to 1918 (being replaced by Moscow for a short period of time between 1728 and 1730). After the October Revolution in 1917, the Bolsheviks moved their government to Moscow. The city was renamed Leningrad after Lenin's death in 1924.  In a wave of De-Leninization following the dissolution of the USSR, the city was restored to its original appellation through a city-wide referendum.
As Russia's cultural centre, Saint Petersburg received over 15 million tourists in 2018. It is considered an important economic, scientific, and tourism centre of Russia and Europe. In modern times, the city has the nickname of being "the Northern Capital of Russia" and is home to notable federal government bodies such as the Constitutional Court of Russia and the Heraldic Council of the President of the Russian Federation. It is also a seat for the National Library of Russia and a planned location for the Supreme Court of Russia, as well as the home to the headquarters of the Russian Navy, and the Western Military District of the Russian Armed Forces. The Historic Centre of Saint Petersburg and Related Groups of Monuments constitute a UNESCO World Heritage Site. Saint Petersburg is home to the Hermitage, one of the largest art museums in the world, the Lakhta Center, the tallest skyscraper in Europe, and was one of the host cities of the 2018 FIFA World Cup and the UEFA Euro 2020.History
Imperial era (1703–1917)
Swedish colonists built Nyenskans, a fortress at the mouth of the Neva River in 1611, which was later called Ingermanland. This area was inhabited by a Finnic tribe of Ingrians. The small town of Nyen grew up around the fort. 
At the end of the 17th century, Peter the Great, who was interested in seafaring and maritime affairs, wanted Russia to gain a seaport to trade with the rest of Europe. He needed a better seaport than the country's main one at the time, Arkhangelsk, which was on the White Sea in the far north and closed to shipping during the winter.
On 12 May [O.S. 1 May] 1703, during the Great Northern War, Peter the Great captured Nyenskans and soon replaced the fortress. On 27 May [O.S. 16 May] 1703, closer to the estuary (5 km (3 mi) inland from the gulf), on Zayachy (Hare) Island, he laid down the Peter and Paul Fortress, which became the first brick and stone building of the new city.The city was built by conscripted peasants from all over Russia; in some years several Swedish prisoners of war were also involved under the supervision of Alexander Menshikov. Tens of thousands of serfs died while building the city. Later, the city became the centre of the Saint Petersburg Governorate. Peter moved the capital from Moscow to Saint Petersburg in 1712, 9 years before the Treaty of Nystad of 1721 ended the war. He referred to Saint Petersburg as the capital (or seat of government) as early as 1704. While the city was being built, Peter lived in a three-room log cabin with his wife Catherine and their children.
During its first few years, the city developed around Trinity Square on the right bank of the Neva, near the Peter and Paul Fortress. However, Saint Petersburg soon started to be built out according to a plan. By 1716 the Swiss Italian Domenico Trezzini had elaborated a project whereby the city centre would be on Vasilyevsky Island and shaped by a rectangular grid of canals. The project was not completed but is evident in the layout of the streets. In 1716, Peter the Great appointed Frenchman Jean-Baptiste Alexandre Le Blond as the chief architect of Saint Petersburg.The style of Petrine Baroque, developed by Trezzini and other architects and exemplified by such buildings as the Menshikov Palace, Kunstkamera, Peter and Paul Cathedral, Twelve Collegia, became prominent in the city architecture of the early 18th century. In 1724 the Academy of Sciences, University and Academic Gymnasium were established in Saint Petersburg by Peter the Great.
In 1725, Peter died at age fifty-two. His endeavors to modernize Russia had been opposed by the Russian nobility. There were several attempts on his life and a treason case involving his son. In 1728, Peter II of Russia moved his seat back to Moscow. But four years later, in 1732, under Empress Anna of Russia, Saint Petersburg was again designated as the capital of the Russian Empire. It remained the seat of the Romanov dynasty and the Imperial Court of the Russian tsars, as well as the seat of the Russian government, for another 186 years until the communist revolution of 1917.
In 1736–1737 the city suffered from catastrophic fires. To rebuild the damaged boroughs, a committee under Burkhard Christoph von Münnich commissioned a new plan in 1737. The city was divided into five boroughs, and the city centre was moved to the Admiralty borough, on the east bank between the Neva and Fontanka.