Ulema (Arabic) are the community of legal scholars of Islam and the Sharia. Their organization and powers vary from Muslim community to community. They are most powerful in Shiah Islam where their role is institutionalized, but where they are subordinate to the heirs of Ali, and the hierarchy of mullahs. In most countries they are merely local power figures.
The Afghanistan Taliban were mostly village ulema who rose to power in the chaos after the Soviet-Afghan War. The most famous was Mullah Omar, who went directly from ruling a small village to running the entire country of Afghanistan as a dictatorship.
As this example demonstrates, the ulema are in most Muslim nations a conservative force, and stand in particular as the bulwark of orthodox thought against ijtihad, or 'independent thought' on religious law (the sharia).
The second half of the 20th century is marked by a considerable loss of authority and influence of the Ulema in most Islamic states except Saudi Arabia and Iran. Many secular Arab governments attempted to break the influence of the Ulema after their rise to power. Religious institutions were nationalized and the system of waqf, religious dotations, which constituted the classical source of income for the ulema, was abolished. In 1961 the Egyptian Nasser regime puts the Al-Azhar university, the highest Islamic intellectual authority, under the direct control of the state. "The Azharis were even put in army uniforms and had to parade under the command of army officers" (G. Keppel, Jihad). In Turkey the traditional derwish convents and Quran schools were dissolved and replaced by state controlled preacher schools in the 1950s and 1960s. After the independence of Algeria president Ben Bella also deprived the algerian organizations of ulema of their power.
The ulema in most nations consider themselves to represent the consensus (or ijma) of the community of Muslims (or umma), or to represent at least the scholarly or learned consensus. Many efforts to modernize Islam itself focus on the re-introduction of ijtihad, empowerment of the umma to form their own ijma, and grassroots democracy to liberalize the sharia.