Abdulhamid or Abdul Hamid II was the 34th sultan of the Ottoman Empire, from 1876 to 1909, and the last sultan to exert effective control over the fracturing state. He oversaw a period of decline with rebellions, and presided over an unsuccessful war with the Russian Empire (1877–78), the loss of Egypt and Cyprus from Ottoman control, followed by a successful war against the Kingdom of Greece in 1897, though Ottoman gains were tempered by subsequent Western European intervention.