|Peter became czar of Russia upon the death of his brother Fedor III in 1682. Under the regency of his sister, Sophia, Peter was to be co-czar with his half-brother Ivan V. But Peter's thirst for control led to his arresting Sophia and dispatching her to a convent. Though Ivan remained, he was apparently weak and occupied only a figurehead position. In 1695, Peter sent his army against the Turks; the port of Azov was captured a year later. In 1697, Peter commenced on an unusual European excursion: for nearly 1 1/2 years, he traveled through Germany, Holland, England, and Austria to acquire first-hand experience with western technology. On his return to Russia, Peter's enthusiastic embrace of western ways was not universally well-received by his subjects. In 1700, having entered into an alliance with Denmark and the ruler of Poland and Saxony, Peter joined in a war against Sweden which lasted over two decades. During this time, however, Peter set about creating his new port city, St. Petersburg. At the war's end in 1721, Sweden was defeated and Russia gained control of portions of Finland, as well as Latvia, Estonia, and Ingria. Under Peter, Russia turned its eyes to the West, becoming an undeniable power in Europe for the first time. His son having died in prison (where he was sent on charges of suspected treason), Peter was succeeded by his second wife, Catherine.