Actually a tug of war for power between a Caliph and the religious scholars in the Ottoman Empire. They both wanted political control and the ulema lost. After that religious institutions were all separated from civic ones.
So ulema is also ulema. What's Caliph?