After retreating from Russia in 1812, Napoleon launched a new campaign in Germany in 1813. The Russian army pursued the French into the Grand Duchy of Warsaw and Prussia, where the Prussian army changed sides under the Treaty of Kalisz and joined the Russian forces against Napoleon. Combined Prussian-Russian forces occupied Berlin on 4 March, only to be defeated by French forces at Lützen on 2 May. Between the armistice on 4 June and 16 August Napoleon trained his inexperienced army, many of whom were conscripts. Meanwhile on the 12 August, Austria declared war. This culminated in the Battle of Dresden, where the French defeated combined Austrian, Prussian and Russian forces. After a series of defeats in September–October, concluding with the Battle of Leipzig, the French withdrew to the Rhine. On the 30–31 October the French managed to deflect the Bavarian-Austrian army at the Battle of Hanau, midway between Bayreuth and Nuremberg.