The government of the Czarevna still persisted in its warlike projects. In return for an active cooperation against the Ottomans, Poland had consented to ratify the conditions of the Treaty of Androussovo, and to sign a perpetual peace (1686). A hundred thousand Muscovites, under the command of Prince Galitsyne, and fifty thousand Little Russian Cossacks, under the orders of the hetman Samoilovitch, marched against the Crimea (1687). The army suffered greatly in the southern steppes, as the Tartars had fired the grassy plains. Galitsyne was forced to return without having encountered the enemy. Samoilovitch was accused of treason, deprived of his command, and sent to Siberia; and Mazeppa, who owed to Samoilovitch his appointment as secretary-at-war, and whose denunciations had chiefly contributed to his downfall, was appointed his successor.

In the spring of 1689 the Muscovite and Ukranian armies, commanded by Galitsyne and Mazeppa, again set out for the Crimea. The second expedition was hardly more fortunate than the first: they got as far as Perekop, and were then obliged to retreat without even having taken the fortress. This double defeat did not hinder Sophia from preparing for her favorite a triumphal entry into Moscow. In vain Peter forbade her to leave the palace; she braved his displeasure and headed the procession, accompanied by the clergy and the images and followed by the army of the Crimea, admitted the generals to kiss her hand and distributed glasses of brandy among the officers. Peter left Moscow in anger, and retired to the village of Preobrajenskoe. The foreign policy of the Czarevna was marked by another display of weakness. By the Treaty of Nertchinsk she restored to the Chinese empire the fertile regions of the Amur, which had been conquered by a handful of Cossacks, and razed the fortress of Albazine, where those adventurers had braved all the forces of the East. On all sides Russia seemed to retreat before the barbarians.

Meanwhile Peter was growing. His precocious faculties, his quick intelligence, and his strong will awakened alike the hopes of his partisans and the fears of his enemies. As a child he only loved drums, swords, and muskets. He learned history by means of colored prints brought from Germany. Zotof, his master, whom he afterward made "the archpope of fools," taught him to read. Among the heroes held up to him as examples we are not surprised to find Ivan the Terrible, whose character and position offer so much analogy to his own. "When the Czarevitch was tired of reading," says M. Zabieline, "Zotof took the book from his hand and, to amuse him, would himself read the great deeds of his father, Alexis Mikhailovitch, and those of the Czar, Ivan Vasilievitch, their campaigns, their distant expeditions, their battles and sieges: how they endured fatigues and privations better than any common soldier; what benefits they had conferred on the empire, and how they extended the frontiers of Russia."

Peter also learned Latin, German, and Dutch. He read much and widely, and learned a great deal, though without method. Like Ivan the Terrible, he was a self-taught man. He afterward complained of not having been instructed according to rule. This was perhaps a good thing. His education, like that of Ivan IV, was neglected, but at least he was not subjected to the enervating influence of the terem—he was not cast in that dull mould which turned out so many idiots in the royal family. He "roamed at large, and wandered in the streets with his comrades." The streets of Moscow at that period were, according to M. Zabieline, the worst school of profligacy and debauchery that can be imagined; but they were, on the whole, less bad for Peter than the palace. He met there something besides mere jesters: he encountered new elements which had as yet no place in the terem, but contained the germ of the regeneration of Russia. He came across Russians who, if unscrupulous, were also unprejudiced, and who could aid him in his bold reform of the ancient society. He there became acquainted with Swiss, English, and German adventurers—with Lefort, with Gordon, and with Timmermann, who initiated him into European civilization.

His court was composed of Leo Narychkine, of Boris Galitsyne, who had undertaken never to flatter him; of Andrew Matveef, who had marked taste for everything European; and of Dolgorouki, at whose house he first saw an astrolabe. He played at soldiers with his young friends and his grooms, and formed them into the "battalion of playmates," who manoeuvred after the European fashion, and became the kernel of the future regular army. He learned the elements of geometry and fortification, and constructed small citadels, which he took or defended with his young warriors in those fierce battles which sometimes counted their wounded or dead, and in which the Czar of Russia was not always spared. An English boat stranded on the shore of Yaousa caused him to send for Franz Timmermann, who taught him to manage a sailing-boat, even with a contrary wind. He who formerly, like a true boyar of Moscow, had such a horror of the water that he could not make up his mind to cross a bridge, became a determined sailor: he guided his boat first on the Yaousa, then on the lake of Pereiaslavl. Brandt, the Dutchman, built him a whole flotilla; and already, in spite of the terrors of his mother, Natalia, Peter dreamed of the sea.

"The child is amusing himself," the courtiers of Sophia affected to observe; but these amusements disquieted her. Each day added to the years of Peter seemed to bring her nearer to the cloister. In vain she proudly called herself "autocrat"; she saw her stepmother, her rival, lifting up her head. Galitsyne confined himself to regretting that they had not known better how to profit by the revolution of 1682, but Chaklovity, who knew he must fall with his mistress, said aloud, "It would be wiser to put the Czarina to death than to be put to death by her." Sophia could only save herself by seizing the throne—but who would help her to take it? The streltsi? But the result of their last rising had chilled them considerably. Sophia herself, while trying to bind this formidable force, had broken it, and the streltsi had not forgotten their chiefs beheaded at Troitsa. Now what did the emissaries of Sophia propose to them? Again to attack the palace; to put Leo Narychkine and other partisans of Peter to death; to arrest his mother, and to expel the patriarch. They trusted that Peter and Natalia would perish in the tumult. The streltsi remained indifferent when Sophia, affecting to think her life threatened, fled to the Dievitchi monastery, and sent them letters of entreaty. "If thy days are in peril," tranquilly replied the streltsi, "there must be an inquiry." Chaklovity could hardly collect four hundred of them at the Kremlin.

The struggle began between Moscow and Preobrajenskoe, the village with the prophetical name (the "Transfiguration" or "Regeneration"). Two streltsi warned Peter of the plots of his sister, and for the second time he sought an asylum at Troitsa. It was then seen who was the true czar; all men hastened to range themselves around him: his mother, his armed squires, the "battalion of playmates," the foreign officers, and even the streltsi of the regiment of Soukharef. The patriarch also took the side of the Czar, and brought him moral support, as the foreign soldiers had brought him material force. The partisans of Sophia were cold and irresolute; the streltsi themselves demanded that her favorite Chaklovity should be surrendered to the Czar. She had to implore the mediation of the patriarch. Chaklovity was first put to the torture and made to confess his plot against the Czar, and then decapitated. Medviedef was at first only condemned to the knout and banishment for heresy, but he acknowledged he had intended to take the place of the patriarch and to marry Sophia; he was dishonored by being imprisoned with two sorcerers, condemned to be burned alive in a cage, and was afterward beheaded. Galitsyne was deprived of his property, and exiled to Poustozersk. Sophia remained in the Dievitchi Monastyr, subjected to a hard captivity. Though Ivan continued to reign conjointly with his brother, yet Peter, who was then only seventeen, governed alone, surrounded by his mother, the Narychkines, and the Dolgoroukis (1689). Sophia had freed herself from the seclusion of the terem, as Peter had emancipated himself from the seclusion of the palace to roam the streets and navigate rivers. Both had behaved scandalously, according to the ideas of the time—the one haranguing soldiers, presiding over councils, walking with her veil raised; the other using the axe like a carpenter, rowing like a Cossack, brawling with foreign adventurers, and fighting with his grooms in mimic battles. But to the one her emancipation was only a means of obtaining power; to the other the emancipation of Russia, like the emancipation of himself, was the end. He wished the nation to shake off the old trammels from which he had freed himself. Sophia remained a Byzantine, Peter aspired to be a European. In the conflict between the Czarevna and the Czar, progress was not on the side of the Dievitchi Monastyr.

The first use the Czar made of his liberty was to hasten to Archangel. There, deaf to the advice and prayers of his mother, who was astounded at this unexpected taste for salt water, he gazed on that sea which no czar had ever looked on. He ate with the merchants and the officers of foreign navies; he breathed the air which had come from the West. He established a dockyard, built boats, dared the angry waves of this unknown ocean, and almost perished in a storm, which did not prevent the "skipper Peter Alexeievitch" from again putting to sea, and bringing the Dutch vessels back to the Holy Cape. Unhappily, the White Sea, by which, since the time of Ivan IV, the English had entered Russia, is frost-bound in winter. In order to open permanent communications with the West, with civilized countries, it was necessary for Peter to establish himself on the Baltic or the Black Sea. Now the first belonged to the Swedes, and the second to the Turks, as the Caspian did to the Persians. Who was first to be attacked? The treaties concluded with Poland and Austria, as well as policy and religion, urged the Czar against the Turks, and Constantinople has always been the point of attraction for orthodox Russia.

Peter shared the sentiments of his people, and had the enthusiasm of a crusader against the infidel. Notwithstanding his ardent wish to travel in the West, he took the resolution not to appear in foreign lands till he could appear as a victor. Twice had Galitsyne failed against the Crimea; Peter determined to attack the barbarians by the Don, and besiege Azov. The army was commanded by three generals, Golovine, Gordon, and Lefort, who were to act with the "bombardier of the Preobrajenski regiment, Peter Alexeievitch." This regiment, as well as three others which had sprung from the "amusements" of Preobrajenskoe—the Semenovski, the Botousitski, and the regiment of Lefort—were the heart of the expedition. It failed because the Czar had no fleet with which to invest Azov by sea, because the new army and its chiefs wanted experience, and because Jansen, the German engineer, ill-treated by Peter, passed over to the enemy. After two assaults the siege was raised. This check appeared the more grave because the Czar himself was with the army, because the first attempt to turn from the "amusements" of Preobrajenskoe to serious warfare had failed, and because this failure would furnish arms against innovations, against the Germans and the heretics, against the new tactics. It might even compromise, in the eyes of the people, the work of regeneration (1695).

Although Peter had followed the example of Galitsyne, and entered Moscow in triumph, he felt he needed revenge. He sent for good officers from foreign countries. Artillerymen arrived from Holland and Austria, engineers from Prussia, and Admiral Lima from Venice. Peter hurried on the creation of a fleet with feverish impatience. He built of green wood twenty-two galleys, a hundred rafts, and seventeen hundred boats or barks. All the small ports of the Don were metamorphosed into dock-yards; twenty-six thousand workmen were assembled there from all parts of the empire. It was like the camp of Boulogne. No misfortune—neither the desertion of the laborers, the burnings of the dock-yards, nor even his own illness—could lessen his activity. Peter was able to write that, "following the advice God gave to Adam, he earned his bread by the sweat of his brow." At last the "marine caravan," the Russian armada, descended the Don. From the slopes of Azov he wrote to his sister Natalia[1]: "In obedience to thy counsels, I do not go to meet the shells and balls; it is they who approach me, but tolerably courteously."