Mohammed Abdullah Hassan's Dervish State successfully repulsed the British Empire four times and forced it to retreat to the coastal region. Due to these successful expeditions, the Dervish State was recognized as an ally by the Ottoman and German Empires. The Turks also named Hassan Emir of the Somali nation, and the Germans promised to officially recognize any territories the Dervishes were to acquire. After a quarter of a century of holding the British at bay, the Dervishes were finally defeated in 1920 as a direct consequence of Britain's new policy of aerial bombardment. As a result of this bombardment, former Dervish territories were turned into a protectorate of Britain. Italy faced similar opposition from Somali Sultans and armies, and did not acquire full control of modern Somalia until the Fascist era in late 1927. This occupation lasted until 1941, and was replaced by a British military administration. Somaliland would remain a protectorate, while Somalia became a trusteeship. The Union of the two countries in 1960 formed the Somali Republic. A civilian government was formed, and on 20 July 1961, through a popular referendum, a new constitution that had first been drafted the year before was ratified.