A konfederacja (, "confederation") was an ad hoc association formed by Polish–Lithuanian szlachta (nobility), clergy, cities, or military forces in the Polish–Lithuanian Commonwealth for the attainment of stated aims. A konfederacja often took the form of an armed rebellion aimed at redressing perceived abuses or trespasses of some (e.g. royal) authority. Such "confederations" acted in lieu of state authority or to force their demands upon that authority. They could be seen as a primary expression of direct democracy and right of revolution in the Commonwealth, and as a way for the nobles to act on their grievances and against the state's central authority. History and function In the late 13th century, confederations of cities, aiming to support public safety and provide security from rampant banditry, appeared, with the first confederation being that of several towns (Poznań, Pyzdry, Gniezno and Kalisz in Greater Poland) in 1298. In the mid-14th century, confederations of nobility, directed against the central authorities, emerged, with the first such confederation being that of 1352. During interregnums, confederations (essentially vigilance committees) formed to replace the inactive royal court, protect internal order, and defend the country from external dangers. The confederations, as a right of revolution, were recognized in Polish law through the Henrician articles (1573), part of the pacta conventa sworn by every Polish king since 1576. They stated (in the articulus de non praestanda oboedientia, a rule dating to 1501 from Privilege of Mielnik) that if the monarch did not recognize or abused the rights and privileges of the nobility (szlachta), the nobles would no longer be bound to obey him and would have the legal right to disobey him. With the beginning of the 17th century, confederations became an increasingly significant element of the Commonwealth's political scene. In the 17th and 18th centuries, confederations were organized by magnates, and were either pro- or anti-royal. A confederation not recognized by the king was considered a rokosz ("rebellion"), although some of the rokosz would be eventually recognized by the king, who could even join them himself. Most pro-royal confederations were usually formed as a response to an anti-royal one, and some would take a form of an extraordinary session of the parliament (sejm), as happened in 1710, 1717 and 1735. Confederations where usually formed in one part of the country, and could expand into "general confederations" taking in most or all of the voivodeships of the Polish–Lithuanian Commonwealth.