In the east the situation developed less favorably for the insurgents. In June, the uprising included the fighting in Courland and Lipawa (Liepāja) was taken, but the Russians soon undertook an offensive aimed at Vilnius. The Lithuanian capital capitulated on August 12. The army of Alexander Suvorov, stationed in Ukraine, became free to act because of the declaration of peace issued by the Ottoman Empire. Suvorov moved west and destroyed Polish outer defense units at the Battle of Brest. The corps of Ivan Fersen, previously withdrawn from the siege of Warsaw, crossed the Vistula to join Suvorov and attack the capital from the east. Kościuszko attempted to prevent this concentration of enemy forces and decided to fight a defensive battle at Maciejowice against Fersen. Twice outnumbered in men and cannons, Kościuszko counted on a timely arrival of the corps of Adam Poniński, present nearby. Fersen attacked the insurgents on October 10, before Poniński was able to come, defeated them and took the wounded Kościuszko a prisoner.