Petrograd, formerly known as St. Petersburg, was the capital of Russia from 1914 until 1924. The city's name change was a response to anti-German sentiment during World War I, reflecting a shift in national identity and unity, particularly during the tumultuous events of the Russian Revolution.