Sophia Alekseyevna (September 17 (27), 1657 – July 3 (14), 1704) was a regent of Russia (1682-1689) who allied herself with a singularly capable courtier and politician, Prince Vasily Galitzine, to install herself as a regent during the minority of her brothers, Peter I and Ivan V. The activity of this "bogatyr-tsarevna" (as Sergey Solovyov called her) was all the more extraordinary, as Muscovite women usually kept themselves aloof from politics.
Sophia was the third daughter of Tsar Alexei I of Russia by his first wife, Maria Miloslavskaya. After the death of her full brother Fyodor Alekseyevich on April 27, 1682, Sophia unexpectedly entered Russian politics, trying to preclude her young half-brother, the 10-year old Peter Alekseyevich, and his Naryshkin relatives, from inheriting the throne.
The Miloslavsky party took advantage of the Moscow Uprising of 1682 to proclaim Ivan V the "first" tsar, young Peter I being relegated to the second position, with Sophia acting as a regent for them both. Vasily Galitzine was installed as a de-facto head of government, responsible for most of the policies during her regency. It was even rumored that Galitzine was Sophia's lover, but this is almost certainly a slander propagated by her enemies.
When the Old Believers joined the rebels in the fall of 1682 and demanded the reversal of Nikon's reforms, Sophia and her court had to flee the Moscow Kremlin and sought refuge in the Troitse-Sergiyeva Lavra. The streltsy rebels, who instigated the rebellion, hoped to depose Sophia and to make Prince Ivan Khovansky a new regent. Eventually, Sophia managed to suppress the so-called Khovanshchina with the help of Fyodor Shaklovityi, who succeeded Khovansky in charge of the Muscovite army.
During her regency, Sophia made a few concessions to posads and loosened detention policies towards runaway peasants, which caused dissatisfaction among the nobles. The most important highlights of her foreign policy, as engineered by Galitzine, were the Eternal Peace Treaty of 1686 with Poland, the 1689 Treaty of Nerchinsk with China, and the Crimean campaigns against Turkey.
When Peter I turned 17 years of age, his Naryshkin relatives demanded Sophia to step down. In response, Shaklovityi advised Sophia to proclaim herself Tsarina and attempted to induce the Streltsy to a new uprising. Most of the Streltsy units, however, deserted downtown Moscow for the suburb of Preobrazhenskoye and later for the Troitse-Sergiyeva Lavra, where the young tsar was living. Feeling the power slipping from her hands, Sophia sent the boyars and the Patriarch to Peter, asking him to join her in the Kremlin. He flatly refused her overtures, demanding Shaklovityi's execution and Galitzine's exile.
After Sophia agreed to surrender her senior boyars, she was put to home arrest and forced to withdraw into the Novodevichy Convent without formally taking the veil. Her fate was sealed ten years later, when the Streltsy attempted to reinstate her in the Kremlin during Peter's absence from the country. This uprising was suppressed with an iron hand, and soon the corpses of the rebels were suspended in front of Sophia's windows. Having taken the veil, she was kept in the strictest seclusion, with other nuns not allowed to see her except on the Easter day. She died in the Novodevichy Convent 6 years later.