Soon afterward, he was defeated at the Battle of Mątwy, and signed the Agreement of Łęgonice on the 21 July, which ended the Lubomirski Rebellion.
Tak lama kemudian, ia dikalahkan dalam Pertempuran Mątwy, dan menandatangani Persetujuan Łęgonice pada 21 Juli, yang mengakhiri Pemberontakan Lubomirski.