Lubomirski's rebellion
Lubomirski's rebellion or Lubomirski's rokosz (), was a rebellion against Polish King John II Casimir that was initiated by Jerzy Sebastian Lubomirski, a member of the Polish nobility. From 1665 to 1666, Lubomirski's supporters paralyzed the proceedings of the Sejm. Lubomirski, with the support of part of the army and the conscripted pospolite ruszenie, defeated royal forces at the Battle of Matwy in 1666. The rebellion ended with the Agreement of Łęgonice, which forced the King to give up his planned reforms like the introduction of vivente rege royal elections. Lubomirski, now a broken man, died soon afterward. Background 
The mid-17th century was one of the most tragic and difficult periods in the history of the Polish–Lithuanian Commonwealth. The country was devastated by several wars, such as the Khmelnytsky Uprising and the Swedish invasion of Poland. Its international position was weakened, and the chaos was deepened by the ill-functioning system of nobles' democracy (see szlachta privileges, Golden Liberty). In 1652, a Lithuanian deputy, Wladyslaw Sicinski, for the first time in Polish history used the liberum veto in the Sejm to stop a bill that was about to be introduced. The country was riven by internal conflicts among the magnates, and its central institutions did not function. King John II Casimir Vasa was aware of the condition of the Polish–Lithuania and initiated an attempt to reform its institutions. In 1658, he introduced a program of improvement of the government, which stipulated voting by majority, creating a government general tax system and other reforms. The Polish Senate tentatively agreed to the reforms, creating a special commission. The problem was the issue of royal elections in Poland since the King and his supporters wanted to introduce Vivente rege, but his opponents disagreed with that system. The King and his wife, Marie Louise Gonzaga, began to look for supporters among the Polish nobility and magnates. Their opponents, acting on the initiative of the Habsburg envoy Franz Paul de Lisola, created their own camp, with such members as Greater Poland's Łukasz Opaliński and Jan Leszczyński, as well as Lesser Poland's Jerzy Sebastian Lubomirski. As a result, all attempts at the reform were defeated. Rebellion 
During the 1661 Sejm, the King urged all envoys to support extra taxes, which were needed to carry out election reform and pay the unpaid soldiers of the army. In response, the magnates opposed royal proposal, and inspirated by Lubomirski, a confederation, the Holy Alliance, was created both in the Kingdom of Poland and the Grand Duchy of Lithuania. Members of the confederation, which consisted mostly of unpaid soldiers, demanded their money. They were supported by some members of the nobility, who above all wanted to keep their ancient privileges, opposed any reforms and wanted to keep the so-called free royal election. Not all soldiers and nobility supported the rebellion, and those who remained loyal to the King, under Stefan Czarniecki, created their own confederation, the so-called Pious Alliance. The 1662 Sejm opposed all attempts of reform of the government except to introduce extra tax for the army. The King, however, did not give up. Aware that Jerzy Lubomirski was the main source of his problems, he in 1664 accused Lubomirski of treason. A Sejm court found Lubomirski guilty, confiscated his properties, sentenced him to infamy and ordered to leave Poland. Lubomirski left for Habsburg-controlled Silesia, where he tried to organize an army with financial support of the Habsburgs to invade the Polish territories that were controlled by the Royal Army. In 1665, Lubomirski announced a rokosz (rebellion), and his army entered the Commonwealth. On 13 July 1666, he faced the royal arm, led by the King himself. Lubomirski's forces were victorious. After the battle, elite regiments, consisting of best soldiers of the Polish Army were murdered by the rebels (altogether, the army lost almost 4,000 of its most experienced men). On 31 July, at the village of Legowice, both the King and Lubomirski signed an agreement. John II Casimir gave up his plans of a reform and declared amnesty for the rebels, and Lubomirski signed a letter of apology. In 1668, under pressure by the Sejm and the nobility and because of the sudden death of the Queen, the King abdicated. See also
 Rokosz
 Confederation (konfederacja)
 Zebrzydowski's Rokosz
 Chicken War

Sources 
 Polish articlel

Rebellions in the Polish–Lithuanian Commonwealth
17th-century rebellions
1665 in the Polish–Lithuanian Commonwealth
1666 in the Polish–Lithuanian Commonwealth