After the Great War, the powers of Russia and Denmark-Norway had a surprising amount of similarities: Both had new lands to integrate, both desired to expand their influence in Europe, and both wished to keep Sweden in check and dominate the Baltic Sea. However, since neither one wanted to fight the other for Baltic dominance for a plethora of reasons and both wanted to focus on containing Sweden, the best way for them to do this was via alliance, and the best way to secure an alliance was by marriage. Peter's daughter, Anna, was to marry Prince Christian VI of Denmark once she was of age. Alexei was Peter's eldest child, but was already married to Princess Charlotte of Brunswick by the time the Great Northern War ended.
Once Anna had reached 17, she was deemed of age and married Christian on May 21, 1725, making her the Princess of the Kingdoms of Denmark and Norway. The prince was a shy but kind man who vowed never to cheat on her with any other woman (a large factor in this being his disgust at his father's infidelity, which brought Christian's mother great sorrow), and Princess Anna was rather happy to be living in Copenhagen, even if she terribly missed her home (as shown by the tearful letters she sent to her sister).
This alliance by marriage had positive and negative results. On the one hand, it had ensured that the 2 kingdoms could unite against any Swedish threat in the future. On the other hand, it made many nations across Europe alarmed and more suspicious of both nations, with quite a few states in the Holy Roman Empire along with others like Britain keeping a watchful eye on the 2 nations.
Russia had come out of the Great War with by far the most land gained, and had established itself as a rising power in Eastern Europe and the Baltic Seas. Now the main issue was how to advance the nation forward now that they'd won the war. Peter "the Great" decided to focus as much funding as possible into the construction of the new capital, Saint Petersburg. With the use of tens of thousands of forced laborers, Peter eventually built the city which would help open up Russia to the rest of Europe. He hired many professionals from Germany, Denmark, and the Dutch Republic to help build the infrastructure of the new capital and make the city look "western" with German style architecture. He made Saint Petersburg the capital of Russia in 1717.
Also, he encouraged the immigration of settlers from Germany and Denmark to settle in Russia in order to improve the country's economy (he promised them many privileges including citizenship and tax breaks for them to move). By 1730, an estimated 17,000 Danish and 45,000 Germans had moved to Russia since 1715, mainly settling in the Baltic provinces and Saint Petersburg. The sizable Danish immigration was helped in large part due to the recent alliance with Russia, along with the land expansion of Denmark post-GNW putting it closer to Russia's northern provinces (making immigration easier).
Peter reorganized his government based on the latest Western models, molding Russia into an
absolutist state. He replaced the old
boyar Duma (council of nobles) with a nine-member senate, in effect a supreme council of state. The countryside was also divided into new
provinces and districts. Peter told the senate that its mission was to collect tax revenues. In turn tax revenues tripled over the course of his reign.
Administrative
Collegia (ministries) were established in St. Petersburg, to replace the old governmental departments. In 1722 Peter promulgated his famous Table of Ranks. As part of the government reform, the Orthodox Church was partially incorporated into the country's administrative structure, in effect making it a tool of the state. Peter abolished the
patriarchate and replaced it with a collective body, the Holy Synod, led by a lay government official. Peter continued and intensified his predecessors' requirement of state service for all nobles.
After 1718, Peter established colleges in place of the old central agencies of government, including foreign affairs, war, navy, expense, income, justice, and inspection. Later others were added. Each college consisted of a president, a vice-president, a number of councilors and assessors, and a procurator. Some foreigners were included in various colleges but not as president. Peter believed he did not have enough loyal and talented persons to put in full charge of the various departments. Peter preferred to rely on groups of individuals who would keep check on one another. Decisions depended on the majority vote.
In 1722, Peter created a new order of precedence known as the
Table of Ranks. Formerly, precedence had been determined by birth. To deprive the Boyars of their high positions, Peter directed that precedence should be determined by merit and service to the Emperor.
Peter decided that all of the children of the nobility should have some early education, especially in the areas of sciences. Therefore, on 28 February 1715, he issued a decree calling for compulsory education, which dictated that all Russian 10- to 15-year-old children of the nobility, government clerks, and lesser-ranked officials must learn basic mathematics and geometry, and should be tested on the subjects at the end of their studies.
Peter introduced new taxes to fund improvements in Saint Petersburg. He abolished the land tax and household tax and replaced them with a poll tax. The taxes on land and on households were payable only by individuals who owned property or maintained families; the new head taxes, however, were payable by serfs and paupers. In 1725 the construction of Peterhof, a palace near Saint Petersburg, was completed. Peterhof (Dutch for "Peter's Court") was a grand residence, becoming known as the "Russian Versailles".
Peter also formed a modern regular army built on the German model, but with a new aspect: officers not necessarily from
nobility, as talented commoners were given promotions that eventually included a noble title at the attainment of an officer's rank. Conscription of peasants and townspeople was based on quota system, per settlement. Initially it was based on the number of households, later it would be based on the population numbers. In the 1722-1723 Russo-Persian War, this military (which had been given 8 years to develop) was quite successful and easily defeated the Safavid armies, resulting in Russia permanently annexing Derbent, Baku, and the province of Shirvan. Persia would've suffered worse, but fortunately the Ottomans didn't join due to heavy Russo-Ottoman tensions.
While many the reforms Peter made would either take years or decades to be fully installed (to say nothing of resistance from conservative members of government), his reforms would help modernize Russia's economy, military, and society, aiding it immensely for centuries to come. The military aspect in particular would be crucial once Russia went to war again in 1730.
As for the modernizing tsar himself, he managed to keep a close relationship with his sister-in law, Tsarevna Natalya Alexeyevna, due to him managing to reconnect with her soon after the Great Northern War had ended. She'd nearly died from a catarrh in 1716, but she was saved by Peter the Great's doctors (and it had been a close thing, since she might not have survived had she not been in Saint Petersburg with her brother in-law). Despite the illness, she managed to recover and continue her pre-war habit of performing plays to support Peter the Great's reforms and oppose the conservative "old guard". Because of this, he named her his heir in 1725 after nearly dying from his illnesses, but he would succumb to a gangrenous bladder just one year later. [1]
This left Natalya Alexeyevna as the Tsarina of the Russian Empire. The first 4 years would see her continue her late brother in-law's reforms and gradually modernize the nation, but her first test would come in 1730, when war would consume Europe for the first time in 15 years...
---------------------------------------------------------------------------------------------------------------------------------------
[1] Multiple minor butterfly effects are created by the war ending earlier, which leads to Peter living one year more (though a death scare causes him to name his sister in-law as an heir due to her supporting his reforms), and Natalya Alexeyevna survives her catarrh due to staying in the city with Peter, which let the best Russian doctors save her (which they could not have done had she gone to visit Eudoxia like she did IOTL. On that note, Peter living longer and Natalya continuing her pro-reform plays will be small but helpful pushes in Russia's reformation. Nothing major, just a little btw.