He took part in the 1764 election of the new Polish monarch, Stanisław II Augustus, with his family. In December 1767, Pulaski and his father became involved with the Bar Confederation, which saw King Stanisław as a Russian puppet and sought to curtail Russian hegemony over the Commonwealth. The confederation was actively opposed by the Russian forces stationed in Poland. Pulaski recruited a unit and, on February 29, 1768, signed the act of the confederation, thus declaring himself an official supporter of the movement. On March 6, he received a "pułkownik" (colonel) rank and commanded a "chorągiew" of cavalry. In March and April, Pulaski agitated among the Polish military, successfully convincing some forces to join the Confederates. He fought his first battle on April 20 near Pohorełe; it was a victory, as was another on April 23 near Starokostiantyniv. An engagement at Kaczanówka on April 28 resulted in a defeat. In early May, he garrisoned Chmielnik but was forced to retreat when allied reinforcements were defeated. He retreated to a monastery in Berdyczów, which he defended during a siege by royalist forces for over two weeks until June 16. Eventually, he was forced to surrender and was taken captive by the Russians. On June 28, he was released in exchange for a pledge that he would not again take up arms with the Confederates, and that he would lobby the Confederates to end hostilities. However, Pulaski considered the assurance to be non-binding and made a public declaration to that effect upon reaching a camp of the Confederates at the end of July. Agreeing to the pledge in the first place weakened his authority and popularity among the Confederates, and his own father considered whether or not he should be court-martialed; some heated debates followed, and Pulaski was reinstated to active-duty only in early September.