BAGHDAD — A militant group’s declaration of an Islamic state in territory it controls in Syria and Iraq touched off celebrations among its followers but drew condemnation and even ridicule from rivals and officials in Baghdad and Damascus.

The declaration of a caliphate was a bold move by the Islamic State of Iraq and the Levant, not just announcing its own state governed by Shariah law but also claiming legitimacy as a successor to the first Islamic rule created by the Prophet Muhammad in the Arabian Peninsula 14 centuries ago.

In an announcement Sunday, the group proclaimed its leader Abu Bakr al-Baghdadi to be the caliph and demanded all Muslims around the world pledge allegiance to him.