Following Napoleon's defeat at the Battle of Leipzig earlier in October, Napoleon began to retreat from Germany into France and relative safety. Wrede attempted to block Napoleon’s line of retreat at Hanau on 30 October. Napoleon arrived at Hanau with reinforcements and defeated Wrede’s forces. On 31 October Hanau was in French control, opening Napoleon’s line of retreat. The Battle of Hanau was a minor battle, but an important tactical victory allowing Napoleon’s army to retreat onto French soil to recover and face the invasion of France. Meanwhile, Davout's corps continued to hold out in its siege of Hamburg, where it became the last Imperial force east of the Rhine.