Ulemas were scholars with an understanding of the law, religion, and administration and held positions in the government.