Hetman
In 1687 Ivan Mazepa accused Samoylovych of conspiring to secede from Russia, secured his ouster, and was elected the Hetman of the Left-bank Ukraine, with the support of Vasily Galitzine. At the same time Ivan Mazepa signed the Kolomak Articles that were based on the Hlukhiv Articles of Demian Mnohohrishny.
Gradually, Mazepa accumulated great wealth, becoming one of Europe's largest land owners. A multitude of churches were built all over Ukraine during his reign in the Ukrainian Baroque style. He expanded the Kyiv-Mohyla Academy, the primary educational institution of Ukraine at the time, to accommodate 2,000 students, founded schools and printing houses.
In 1702, the Cossacks of Right-bank Ukraine, under the leadership of hetman Semen Paliy, began an uprising against Poland, which after early successes was defeated. Mazepa convinced Russian Tsar Peter I to allow him to intervene, which he successfully did, taking over major portions of Right-bank Ukraine, while Poland was weakened by invasion of Swedish king Charles XII.
Read more about this topic: Ivan Mazepa