Thirty-fourth Ottoman sultan (r. 1876–1909). His reign faced overwhelming difficulties: an insolvent treasury, violent nationalist movements in the Balkans, antireform movements among some Muslims, and increasing foreign intervention. A disastrous military defeat by the Russians (1877) resulted in major territorial concessions and an influx of Muslim refugees from the ceded lands. Nevertheless, Abdulhamid's reign expanded public works, including highways, railroads, and telegraph lines. Education, literacy, and judicial services improved significantly. In the wake of rising nationalist sentiments and alienated religious and army groups, Abdulhamid was dethroned in 1909 and spent the rest of his life under house arrest.