Abbas II Helmy Bey ( also known as Abbās Ḥilmī Pasha , In 1914 , after the Ottoman Empire joined the Central Powers in World War I , the nationalist Khedive was removed by the British , then ruling Egypt , in favor of his more pro-British uncle , Hussein Kamel , marking the de jure end of Egypt 's four-century era as a province of the Ottoman Empire , which had begun in 1517 .