Ivan Stepanovych Mazepa () was a Ukrainian military, political and civic leader who served as hetman of the Cossack Hetmanate in 1687–1709. His long and stable rule was marked by economical and political recovery from the Ruin. A loyal subject of Russia during most of his rule, Mazepa's close relationship with Tsar Peter I deteriorated as a result of the latter's administrative reforms, which increasingly deprived Mazepa and the Hetmanate of their autonomy. In 1708, Mazepa abandoned his alliance with Peter I and sided with Charles XII of Sweden after the Tsar refused to protect the Hetmanate against the advancing Swedes, instead ordering that much of Ukraine be burned to prevent the Swedes from gaining access to supplies and winter quarters.

After the Swedes were defeated at the Battle of Poltava in 1709, Mazepa went into exile in Moldavia and died there later that year. The political consequences and interpretation of his defection have resonated in the national histories of both Ukraine and Russia. The historical events of Mazepa's life have inspired many literary, artistic and musical works, and the hetman himself was famous as a patron of the arts.

The Russian Orthodox Church pronounced an anathema (or the highest form of excommunication) on Mazepa's name in 1708 and has maintained it ever since. The anathema was not recognized by the Ecumenical Patriarchate of Constantinople, which considers it uncanonical and imposed with "political motives as a means of political and ideological repression, with no religious, theological or canonical reasons". Pro-independence and anti-Russian elements in Ukraine from the 18th century onwards were derogatorily referred to as Mazepintsy ().Compare: The alienation of Mazepa from Ukrainian historiography continued during the Soviet period, but post-1991 in independent Ukraine Mazepa's image has been gradually rehabilitated.

Early life

Birth and ancestry

Mazepa was born on in the village of , near Bila Tserkva, then part of the Kiev Voivodeship of the Polish–Lithuanian Commonwealth, into the noble Mazepa family. His father, Stepan Adam Mazepa-Kaledynsky (), was the town otaman of Bila Tserkva during the Khmelnytsky Uprising, while his mother, Maryna Mokiievska, was also of Cossack blood. Maryna later became the hegumene of the in Kyiv after the death of her husband and was then known by her monastic name, Mariia Mahdalena; the couple also had a younger daughter, Oleksandra.

Throughout his life Mazepa used the coat of arms, likely inherited from the Bulyha- family, whose members had served as starosts of Bila Tserkva between 1578–1618. In 1707, Mazepa's coat of arms was confirmed by Joseph I, Holy Roman Emperor, who awarded the hetman with the title of Prince of the Holy Roman Empire.

In Polish service In 1657, Stepan Mazepa became involved with Hetman Ivan Vyhovsky, who pursued a pro-Polish policy. In 1659, he travelled to Warsaw to attend the sejm and placed his son Ivan in service at the royal court of John II Casimir Vasa. Before that, Ivan Mazepa studied at the Kyiv Mohyla Collegium in Kyiv graduated with a degree in rhetoric. According to Samiilo Velychko, Ivan was to complete his philosophy course at the Jesuit college in Warsaw.

According to late tradition, King John Casimir sent Ivan Mazepa to study "gunnery" in Deventer (Dutch Republic) in 1656–1659, during which time he travelled across Western Europe. From 1659 the Polish king was sending him on numerous diplomatic missions to Ukraine. His service at the Polish royal court earned him a reputation as an alleged catholicized liakh (a more offensive word for a Pole)Hrushevsky, M., page 382. – later the Russian Imperial government would effectively use this slur to discredit Mazepa.

During one of his missions, Mazepa met Jan Chryzostom Pasek, whom he took to be a supporter of the anti-royal confederation. He led to Pasek's arrest and had him brought before the king, who was staying in Grodno at the time. According to Pasek's account, he managed to prove his innocence, the king rewarded him for the harm he suffered and Mazepa lost the royal trust. Further on in his memoirs, Pasek recounts the story of under what circumstances Mazepa left Poland in 1663. According to Pasek, Mazepa had an affair with Mrs. Falbowska, wife of his neighbour in Volhynia. When the neighbour discovered the affair, he tied Mazepa naked to a horse, head to tail, and fastened the horse. The horse carried Mazepa to his household, but he was so badly wounded that his own subjects were unable to recognize him. Pasek's memoirs were written in 1690–1695, when Mazepa was already a Cossack hetman; it is possible that Pasek, who had a personal grudge against Mazepa, colored the story. However, this anecdote also appears in the anonymous Memoirs to the Reign of Augustus II and in the memoirs of Marquis de Bonnac. The story was later recounted by Voltaire in his Histoire de Charles XII and became a recurring motif in the literary works of such writers as Victor Hugo, Lord Byron, Alexander Pushkin or Juliusz Słowacki, as well as in the paintings of such painters as Horace Vernet, Eugène Delacroix, Théodore Chassériau, Théodore Géricault and others. The tale was probably widespread by then and referred to Mazepa's reputation as a womanizer.

Despite Pasek's accounts, Mazepa still remained in royal service. In February 1663 he was sent to the Cossack Hetman Pavlo Teteria, to whom he brought the Hetman's mace, presented to Teteria by . Mazepa then took part in a royal campaign against Russia in Left-bank Ukraine in years 1663–1664. Mazepa was certainly still at the royal court in 1665, probably until the abdication of John II Casimir in 1668.

Under Hetman Doroshenko After the death of his father (ca. 1665), Mazepa inherited the title of the Chernihiv cupbearer. From 1669 to 1673 he served under Petro Doroshenko, hetman of Right-Bank Ukraine from 1665 to 1672, as a squadron commander in the Hetman Guard. In this role he participated in Doroshenko's 1672 campaign in Halychyna, and was a chancellor on diplomatic missions to Poland, Crimea, and the Ottoman Empire. In the course of one of such missions, in 1674 Mazepa was captured on his way to Crimea by the Kosh Otaman Ivan Sirko, and during the following seven years served as a "courtier" of Doroshenko's rival, hetman Ivan Samoylovych. From 1677 to 1678 Mazepa participated in the Chyhyryn campaigns, during which Yuri Khmelnytsky, with the support from the Ottoman Empire, tried to regain power in Ukraine. The young, educated Mazepa quickly rose through the Cossack ranks, being promoted to army osaul in 1681, which brought him close to the elite (starshyna) of Cossack military leadership.

Hetman of the Zaporozhian Host

Early rule In 1687 Mazepa accused Samoylovych of conspiring to secede from Russia, secured his ouster, and was elected hetman of Left-bank Ukraine in Kolomak,Katchanovski, et al., p. 362 with the support of Vasily Galitzine. Following his confirmation, the new hetman signed the Kolomak Articles, which were based on the Hlukhiv Articles of Demian Mnohohrishny. In 1689 Mazepa supported the deposition of Tsarevna Sophia, who had served as de facto regent of Tsar Peter I. This helped him ingratiate himself with the monarch, who valued the wide experience and education of the much older hetman. In words of a Russian historian, Mazepa "was like a father to Peter I in a sense".

As hetman, Mazepa used his knowledge in military matters to introduce a new successful strategy in the fight against the Tatars and their Ottoman overlords. This success relieved both Ukraine and Muscovy from the danger of devastating enemy raids and led Peter I to award the hetman with the Order of St. Andrew, the Tsardom's highest honour. The order, as well as the title of honourable prince of the Holy Roman Empire, awarded to the hetman by Emperor Joseph I in 1707 as recognition of his help in the fight against the Ottomans and Tatars, greatly contributed to Mazepa's status both in Ukraine and at the Moscow court.

With the personal agreement of Peter I, Mazepa managed to become an undisputed ruler of the Hetmanate, concentrating most power over Ukraine, including gathering of taxes, in hands of his own administration. As hetman, Mazepa became known as a patron of culture and arts. A multitude of churches were built all over Ukraine during his reign in the Ukrainian Baroque style. He founded schools and printing houses, and expanded the Kiev-Mohyla Academy, the primary educational institution of Ukraine at the time. In many regards Mazepa greatly contributed to the establishment of the Russian Empire by supporting the policies of Peter I and providing the monarch with people needed to bring his reformist ideas into life. For example, the majority of religious figures who helped Peter I to reform the Russian Orthodox Church by bringing it under increased state control came from the Hetmanate, including Orthodox bishops Stefan Yavorsky and Theophan Prokopovich.

Himself a highly educated person who could speak both Latin and German, Mazepa established his court in a Western manner, reflecting the influence of Baroque art and literature on Ukrainian lands during that period. Mazepa's personal residence was reported to house one of the most extensive libraries of its time, containing numerous books and illuminated manuscripts from around Europe.

Domestic policy Mazepa inherited a country which was only gradually recovering from the devastating years of civil war following Bohdan Khmelnytsky's death, known as the Ruin. Financial troubles arose even before Khmelnytsky's death, however: the Hetmanate had committed to maintaining an army of 60,000 Registered Cossacks and paying them a fixed salary in agreements with Russia. This cost the treasury nearly two million zloty per annum. In addition to this, Russia was to receive some income as well. Meanwhile, Khmelnytsky could only collect zloty annually, of which half constituted income from the leasehold system, in which the privilege, or lease (), to engage in certain trades (such as milling, distilling alcohol, and brewing beer and mead) was sold to willing buyers; this was largely a continuation of the existing Polish-Lithuanian system. The rest was made up of import and export fees and other taxes. The result of this large budget deficit was that the Registered Cossacks were not paid their salaries, which undermined the very foundation of the Cossack state.

Mazepa's predecessor, Hetman Ivan Samoylovych had managed to restore a measure of stability and raise taxes through a continuation of the old leasehold system. At the end of his rule, however, Prince Golitsyn insisted on an abolition of the leasehold taxes. The Kolomak Articles, signed at the beginning of Mazepa's rule, also supported the abolition of leaseholding. This, however, once again left the Hetmanate without a suitable way to raise taxes to pay for the increasingly important mercenary, or professional, infantry (serdiuk) and cavalry () regiments.