BAGHDAD -- A militant extremist group's unilateral declaration of an Islamic state is threatening to undermine its already-tenuous alliance with other Sunnis who helped it overrun much of northern and western Iraq.

One uneasy ally has vowed to resist if the militants try to impose their strict interpretation of Shariah law.

Fighters from the al Qaeda breakaway group Islamic State of Iraq and the Levant have spearheaded the offensive in recent weeks that has plunged Iraq into its deepest crisis since the last U.S. troops left in 2011. The group's lightning advance has brought under its control territory stretching from northern Syria as far as the outskirts of Baghdad in central Iraq.

In a bold move Sunday, the group announced the establishment of its own state, or caliphate, governed by Islamic law. It proclaimed its leader, Abu Bakr al-Baghdadi, a highly ambitious Iraqi militant with a $10 million U.S. bounty on his head, to be the caliph, and it demanded that Muslims around the world pledge allegiance to him.

Through brute force and meticulous planning, the Sunni extremist group -- which said it was changing its name to simply the Islamic State, dropping the reference to Iraq and the Levant -- has managed to effectively erase the Syria-Iraq border and lay the foundations of its proto-state. Along the way, it has battled Syrian rebels, Kurdish militias and the Syrian and Iraqi militaries.

Now, the group's declaration risks straining its loose alliances with other Sunnis who share the militants' hopes of bringing down Iraq's Shiite-led government but not necessarily its ambitions of carving out a transnational caliphate. Iraq's minority Sunnis complain they have been treated as second-class citizens and unfairly targeted by security forces.

Topping the list of uneasy allies is the Army of the Men of the Naqshabandi Order, a Sunni militant organization with ties to Saddam Hussein's now-outlawed Baath Party. The group depicts itself as a nationalist force that defends Iraq's Sunnis from Shiite rule.

A senior Naqshabandi commander in Diyala province northeast of Baghdad told The Associated Press that his group has "no intention" of joining the Islamic State or working under it. He said that "would be a difficult thing to do because our ideology is different from the Islamic State's extremist ideology."

"Till now, the Islamic State fighters are avoiding any friction with us in the areas we control in Diyala, but if they are to change their approach toward our fighters and people living in our areas, we expect rounds of fighting with the Islamic State's people," said the commander who goes by the nom de guerre of Abu Fatima.

A second Naqshabandi leader in Diyala, in the Sunni town of Qara Tappah, also dismissed the notion of submitting to the militants' vision.

"We reject the caliphate rule presented by them. We are totally different from the Islamic State," said the commander, who goes by the name of Abu Abid. He too said that so far relations have been friendly enough, but that residents are wary of what the future may hold.

"Their number is small but we are afraid of the future when their number in the town becomes big," he said. "We know that these militants are treacherous and they plan to eliminate any competition, but we are ready to stop them."

If history is any guide, they have reason to worry. In Syria, the Islamic State of Iraq and the Levant also co-operated with many rebel groups after initially pushing into the country in spring 2013. Over time, however, it moved against its erstwhile allies and eventually crushed them.

It has followed a similar pattern in imposing its strict interpretation of Islamic law, choosing to overlook some practices it considers forbidden before eventually tightening its grip and implementation.

In Iraq's second-largest city of Mosul, which the insurgents overran earlier in June, they issued rules but have not rigidly enforced them. Signs emerged Sunday that tactics may be changing there.

Residents said three or four armed men in Afghan-style clothing but speaking in Iraqi accents told cafe owners in the Ghabat -- a wooded area dotted with cafes and popular with locals -- to stop serving water pipes, or shisha, saying it is forbidden under Islamic law. Other cafes in the city followed suit out of fear, and traders in Mosul were told Monday to stop importing the water pipes to the city, residents said.

The showcase of the extremist group's vision of its Islamic state is Raqqa, a city of 500,000 in northern Syria along the Euphrates River. Since expelling rival rebel groups this spring from the city, the militants have banned music, forced Christians to pay an Islamic tax for protection, and killed violators of its interpretation of Islam in the main square, activists say.

It was among the group's supporters in Raqqa that the declaration of establishing the caliphate touched off some of the largest scenes of jubilation, with fighters parading in the city. Some revelers wore traditional robes and waved the group's black flags in a central square, while others zoomed around in pickup trucks amid celebratory gunfire.

Activists in the city confirmed details of the online video of the events.

Elsewhere in Syria, the announcement was greeted with condemnation and even disdain, including from rival rebel groups who have been fighting the Islamic State since January.

"The gangs of al-Baghdadi are living in a fantasy world. They're delusional. They want to establish a state but they don't have the elements for it," said Abdel-Rahman al-Shami, a spokesman for the Army of Islam, an Islamist rebel group. "You cannot establish a state through looting, sabotage and bombing."

Speaking over Skype from eastern Ghouta, near the capital of Damascus, al-Shami described the declaration as "psychological warfare" that he predicted will turn people against the Islamic State.

In Iraq, where the government has launched a counteroffensive to try to claw back some of the territory it has lost, the declaration is viewed through the prism of the country's rising sectarian tensions.

"This is a project that was well-planned to rupture the society and to spread chaos and damage," said Hamid al-Mutlaq, a Sunni lawmaker. "This is not to the benefit of the Iraqi people, but instead it will increase the differences and splits."

The government, which has tried portray the broader Sunni insurgency it faces as a terrorist threat, pointed to the Islamic State's declaration to back up its claims. Government spokesman Ali al-Moussawi said: "The world now bears a big and ethical responsibility to fight those terrorists who made Iraq and Syria their battlefield."

With sectarian pressures already running high, three mortar shells landed near the gate of a much-revered Shiite shrine in the city of Samarra late Monday, wounding at least nine people, said Mizhar Fleih, the deputy head of the Samarra municipal council.

The golden-domed al-Askari mosque in Samarra is one of the holiest shrines in Shiite Islam. Sunni militants blew up the dome in 2006, helping trigger some of the country's worst sectarian bloodshed as Shiite extremists retaliated forcefully.

Also Monday, the UN's humanitarian office reported that the number of people fleeing their homes in the ongoing crisis in Iraq continues to increase rapidly and has reached an estimated 650,000, bringing the total number of displaced, including from Anbar province, to over 1.2 million inside Iraq, UN spokesman Stephane Dujarric said.

"Our hope remain very much that ... the political meetings in Iraq tomorrow will create a positive atmosphere to create a government in which all Iraqis feel they have a voice," Dujarric said at UN headquarters in New York.

Iraq's new parliament holds its inaugural session Tuesday. The country's top Shiite cleric urged lawmakers last week to agree on a prime minister before lawmakers meet, trying to avert months of wrangling that could further destabilize Iraq.