In 1812, Napoleon's forces were decimated in their failed attempt to subdue Russia, and started their westward retreat. Sweden allied with Russia on 30 August 1812, with the United Kingdom on 3 March 1813, and with Prussia on 22 April 1813. Previously, on 23 March 1813, she had declared war on Napoleon. Bernadotte's condition for entering the anti-Napoleonic alliance was the gain of Norway, which the United Kingdom and Russia accepted in May 1813. Prussia however did not acknowledge this claim at first. Thus, Bernadotte hesitated to enter the war with full force, and only engaged in a campaign against Hamburg which on 30 June was re-conquered by allied French and Danish forces. When Prussia finally accepted the Swedish claim to Norway on 22 July, Sweden joined the alliance of Reichenbach concluded between Russia, the United Kingdom and Prussia on 14/15 June. With three armies (North, Main and Silesian, the Northern army under Bernadotte's command), the allies subsequently cleared Northern Germany of French forces. Denmark, who had maintained the alliance with Napoleon because of the Swedish claim to Norway, was isolated and, as a consequence of the war, bankrupt.