In 1807, Kalisz became a provincial capital within the Duchy of Warsaw. During Napoleon's invasion of Russia, following Yorck's Convention of Tauroggen of 1812, von Stein's Treaty of Kalisz was signed between Russia and Prussia in 1813, confirming that Prussia now was on the side of the Allies.