Tracing its origins to the Quran and early Islamic communities, the practice of "ifta" crystallized with the emergence of the traditional legal theory and schools of Islamic jurisprudence ("madhhabs"). In the classical legal system, fatwas issued by muftis in response to private queries served to inform Muslim populations about Islam, advise courts on difficult points of Islamic law, and elaborate substantive law. In later times, muftis also issued public and political fatwas that took a stand on doctrinal controversies, legitimized government policies or articulated grievances of the population.