Гадячский договор
Following his consolidation of power within Ukraine, Vyhovsky attempted to reach an acceptable agreement with the Poles. Encouraged by his aristocratic friend Yuri Nemyrych, Vyhovsky entered negotiations with the Polish government, which resulted in the Treaty of Hadiach, signed on 16 September, 1658. Under the conditions of the treaty, Ukraine as the Grand Duchy of Ruthenia, would become a third and autonomous component of the Polish–Lithuanian Commonwealth, under the ultimate sovereignty of the King of Poland, but with its own military, courts, and treasury. Additionally, adherents of the Orthodox faith were to receive equal consideration as Catholics. As such, the treaty as signed would have assured the Cossacks of autonomy and dignity to an extent they had not known for centuries.