Because the British naval blockade severed communications between Denmark and Norway, a provisional Norwegian government was set up in Christiania, led by army general Prince Christian August of Augustenborg. This first national government after several centuries of Danish rule demonstrated that home rule was possible in Norway, and was later seen as a test of the viability of independence. Christian August's greatest challenge was to secure the food supply during the blockade. When Sweden invaded Norway in the spring of 1808, he commanded the army of Southern Norway and compelled the numerically superior Swedish forces to withdraw behind the border after the battles of Toverud and Prestebakke. His success as a military commander and as leader of the provisional government made him very popular in Norway. Moreover, his Swedish adversaries noticed his merits and his popularity, and in 1809 chose him as successor to the Swedish throne after King Gustav IV Adolf was overthrown.