The Treaty of Hadiach (Polish: ugoda hadziacka; Ukrainian: гадяцький договір) was a treaty signed on 16 September 1658 in Hadiach (Hadziacz, Hadiacz, Гадяч) between representatives of the Polish–Lithuanian Commonwealth (represented by S. Bieniewski and K. Jewłaszewski) and Ukrainian Cossacks (represented by Hetman Ivan Vyhovsky and starshina (sztarszyna, the elders) Yuri Nemyrych, architect of the treaty, and Pavlo Teteria). It was designed to elevate the Cossacks and Ruthenians to the position equal to that of Poland and Lithuania in the Polish–Lithuanian union and in fact transforming the Polish–Lithuanian Commonwealth into a Polish–Lithuanian–Ruthenian Commonwealth (Rzeczpospolita Trojga Narodów, "Commonwealth of Three Nations").
The specific features of the Treaty of Hadiach were:
Historian Andrew Wilson has called this "one of the great 'What-ifs?' of Ukrainian and East European history", noting that "If it had been successfully implemented, the Commonwealth would finally have become a loose confederation of Poles, Lithuanians and Ruthenians. The missing Ukrainian buffer state would have come into being as the Commonwealth's eastern pillar. Russian expansion might have been checked and Poland spared the agonies of the Partitions or, perhaps just as likely, it might have struggled on longer as the 'Sick man of Europe'" (p. 65).
In spite of considerable Roman Catholic Clergy opposition, the Treaty of Hadiach was approved by Polish king and parliament (Sejm) on 22 May 1659, but with an amended text. The idea of a Ruthenian Duchy within the Commonwealth was completely abandoned. It was a Commonwealth attempt to regain influence over the Ukrainian territories, lost after the series of Cossack uprisings (like the Khmelnytsky Uprising) and growing influence of Muscovy over the Cossacks (like the 1654 Treaty of Pereyaslav).