Following its independence in 1830, Belgium had been obliged to remain neutral in perpetuity by an 1839 treaty as part of a guarantee for its independence. Before the war, Belgium was a constitutional monarchy and was noted for being one of the most industrialised countries in the world. On 4 August 1914, the German army invaded Belgium just days after presenting an ultimatum to the Belgian government to allow free passage of German troops across its borders. The German army advanced rapidly into Belgium, besieging and capturing the fortified cities of Liège, Namur and Antwerp and pushing the 200,000-strong Belgian army, supported by their French and British allies, to the far west. Large numbers of refugees also fled to neighbouring countries. In October 1914, the German advance was finally stopped near the French border by a Belgian force at the Yser and by a combined Franco-British force at the Marne. As a result, the front line stabilised with most of Belgium already under German control. In the absence of any decisive offensive, most of Belgium remained under German control until the end of the war.