In January 1942, with the final official surrender of the Italians, the British, under American pressure, signed an interim Anglo-Ethiopian Agreement with Selassie, acknowledging Ethiopian sovereignty. Makonnen Endelkachew was named as Prime Minister and on 19 December 1944, the final Anglo-Ethiopian Agreement was signed. Eritrea was placed under British military administration for the duration and in 1950, it became part of Ethiopia. After 1945, Britain controlled both Somalilands, as protectorates. In November 1949, the United Nations granted Italy trusteeship of Italian Somaliland under close supervision, on condition that Somalia achieve independence within ten years. British Somaliland became independent on 26 June 1960 as the State of Somaliland, the Trust Territory of Somalia (ex-Italian Somaliland) became independent on 1 July 1960 and the territories united as the Somali Republic. British Somaliland would later declare independence on 18 May 1991 and since then has been an autonomous internationally unrecognized state known as the Republic of Somaliland.