The provinces and government of the Ottoman Empire started to have a different organization because of the reforms that Sultan Mahmud II started. His government named new governors for the provinces, and took away the authority of the Kurdish emirs and governors. There was a lot of fighting against this and the Ottoman army started to attack the Kurdish emirs. In the Qajar Empire, the existence of the Kurdish emirates in Khorasan ended in the first half of the 19th century. The Ardalan clan continued to control Sanandaj until the 1860s. At that time, the Qajar government ended the clan's inherited position as governor.