The defining crisis of his early reign was the War of the Bar Confederation (1768–1772) that led to the First Partition of Poland (1772). The later part of his reign saw reforms wrought by the Diet (1788–1792) and the Constitution of 3 May 1791. These reforms were overthrown by the 1792 Targowica Confederation and by the Polish–Russian War of 1792, leading directly to the Second Partition of Poland (1793), the Kościuszko Uprising (1794) and the final and Third Partition of Poland (1795), marking the end of the Commonwealth. Stripped of all meaningful power, Poniatowski abdicated in November 1795 and spent the last years of his life as a captive in Saint Petersburg's Marble Palace.