The Polish–Lithuanian Commonwealth, formally known as the Kingdom of Poland and the Grand Duchy of Lithuania, and, after 1791, as the Commonwealth of Poland, was a country and bi-federation of Poland and Lithuania ruled by a common monarch in real union, who was both King of Poland and Grand Duke of Lithuania. It was one of the largest and most populous countries of 16th to 17th-century Europe. At its largest territorial extent, in the early 17th century, the Commonwealth covered almost 1,000,000 km2 (400,000 sq mi) and as of 1618 sustained a multi-ethnic population of almost 12 million. Polish and Latin were the two co-official languages.
The Commonwealth was established by the Union of Lublin in July 1569, but the Crown of the Kingdom of Poland and the Grand Duchy of Lithuania had been in a de facto personal union since 1386 with the marriage of the Polish queen Jadwiga (Hedwig) and Lithuania's Grand Duke Jogaila, who was crowned King jure uxoris Władysław II Jagiełło of Poland. The First Partition in 1772 and the Second Partition in 1793 greatly reduced the state's size and the Commonwealth was partitioned out of existence with the Third Partition in 1795.
The Union possessed many features unique among contemporary states. Its political system was characterized by strict checks upon monarchical power. These checks were enacted by a legislature (sejm) controlled by the nobility (szlachta). This idiosyncratic system was a precursor to modern concepts of democracy, as of 1791 constitutional monarchy, and federation. Although the two component states of the Commonwealth were formally equal, Poland was the dominant partner in the union.The Polish–Lithuanian Commonwealth was marked by high levels of ethnic diversity and by relative religious tolerance, guaranteed by the Warsaw Confederation Act 1573; however, the degree of religious freedom varied over time. The Constitution of 1791 acknowledged Catholicism as the "dominant religion", unlike the Warsaw Confederation, but freedom of religion was still granted with it.After several decades of prosperity, it entered a period of protracted political, military, and economic decline. Its growing weakness led to its partitioning among its neighbors (Austria, Prussia, and Russia) during the late 18th century. Shortly before its demise, the Commonwealth adopted a massive reform effort and enacted the 3 May Constitution, which was the first codified constitution in modern European history and the second in modern world history after the United States Constitution.