On September 16, 1658 in Hadyach, an official document was signed between representatives of the Cossack Hetmanate and Poland. Under the conditions of the treaty, Ukraine 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. But the treaty, although ratified by the Diet in May 1659, was never implemented because it was unpopular among the lower classes of the Ruthenian society, where more rebellions occurred. Eventually Vyhovsky surrendered the office of hetman and fled to Poland. The newly re-installed Yurii Khmelnytsky signed the newly composed Pereyaslav Articles that were increasingly unfavorable for the Hetmanate and later led to introduction of serfdom rights.