In 1647, Sylvester Kosiv was elected Metropolitan of Kyiv, Halych and All Rus. Neither the Cossacks nor the bishops appealed to the king for permission to choose a metropolitan, but directly received blessings from the Ecumenical Patriarch of Constantinople. Peter Mohyla's comrade and ally, the new metropolitan, tried to continue the affairs of his predecessor at this difficult time. According to the Treaty of Zboriv (1649), the Orthodox Church was granted significant rights. And the Ukrainian Orthodox metropolitan was to take second place in the Sejm of the Rzeczpospolita, after the Catholic primate. However, despite the Sejm's approval of this agreement, it was not implemented due to the continuation of hostilities. The defeat of the Cossack army near Berestechko led to the signing in 1651 of the Treaty of Bila Tserkva, much worse than the previous one.