He became czar of Russia in 1682, after his sister Sophia Alekseyevna of Russia lost a war. In 1697 he visited Western Europe and decided Russia must have access to the sea. He built the city and seaport of St. Petersburg which became the capital of Russia in 1711. He changed Russia's society, by making new laws so it would be modern like the European countries of the new Age of Enlightenment. Prince Alexander Danilovich Menshikov was a close friend of the emperor but was later disgraced due to embezzlement of national funds.