BEIRUT — A rejuvenated al-Qaeda force asserted control over the western Iraqi town of Fallujah on Friday, raising its flag over government buildings and declaring an Islamic state in one of the most crucial areas that U.S. troops fought to pacify before withdrawing from Iraq two years ago.

The capture of Fallujah came amid an explosion of violence across the western desert province of Anbar in which local tribes, the Iraqi security forces and al-Qaeda militants have been fighting for days in a confusingly chaotic three-way war.

Elsewhere in the province, local tribal militias said they were gaining ground against the al-Qaeda militants who surged into urban areas from their desert strongholds earlier this week after clashes erupted between local residents and the Iraqi security forces.

In Fallujah, where Marines fought the bloodiest battle of the Iraq war in 2004, the militants appeared to have the upper hand, underscoring the extent to which the Iraqi security forces have struggled to sustain the gains made by U.S. troops before they withdrew in December 2011.

The upheaval also affirmed the soaring capabilities of the Islamic State of Iraq and Syria, or ISIS, the rebranded version of the al-Qaeda in Iraq organization that formed a decade ago to confront U.S. troops and expanded into Syria last year while also escalating its activities in Iraq.

“At the moment, there is no presence of the Iraqi state in Fallujah,” said a local journalist who asked not to be named because he fears for his safety. “The police and the army have abandoned the city, al-Qaeda has taken down all the Iraqi flags and burned them, and it has raised its own flag on all the buildings.”

At Friday prayers, held outdoors and attended by thousands of people, a masked ISIS fighter took the podium and addressed the crowd, declaring the establishment of an “Islamic emirate” in Fallujah and promising to help residents fight the government of Prime Minister Nouri al-Maliki and his Iranian allies.

“We don’t want to hurt you. We don’t want to take any of your possessions,” the masked man told the crowd, according to the journalist, who attended the prayers. “We want you to reopen the schools and institutions and return to your normal lives.”

The extent of the militants’ control over the town was unclear, however. Some local tribes were challenging their presence, and there were scattered firefights in several parts of the town, according to another Fallujah resident who also did not want to be named because he is afraid.

The Iraqi army fired shells into Fallujah from bases outside the town, killing at least 17 people, and most residents spent the day hiding indoors, he said.

In the provincial capital Ramadi, tribal fighters have succeeded in ejecting al-Qaeda loyalists, said Ahmed Abu Risha, a tribal leader who fought alongside U.S. troops against al-Qaeda after the “surge” of U.S. troops in 2007.

The tribesmen are fighting alongside Iraqi police, Abu Risha said, and among those killed in the fighting was Abu Abdul Rahman al-Baghdadi, the emir, or leader, of ISIS in Ramadi.

“All the tribes of Anbar are fighting against al-Qaeda,” he said. “We are happy this fight is taking place. We will confront them face to face, and we will win this battle.”

But it was unclear whether all of the tribal fighters battling the al-Qaeda militants were doing so in alliance with the Iraqi government. The current violence evolved from a year-long, largely peaceful Sunni revolt against al-Maliki’s Shiite-dominated government. The revolt was inspired by the Arab Spring demonstrations elsewhere in the region but rooted in the sectarian disputes left unresolved when U.S. troops withdrew.

When al-Maliki dispatched the Iraqi army to quell one of the protests in Ramadi this week, the local tribes fought back. Al-Maliki ordered the troops to withdraw, creating an opportunity for al-Qaeda fighters to surge into the towns from their desert strongholds and triggering battles across the province.

Though some tribes have now turned against al-Qaeda, others have not, said Kirk Sowell, a political risk analyst based in the Jordanian capital, Amman, who edits the newsletter Inside Iraqi Politics.

“Basically no one is in control,” he said. “The situation was really horrible anyway, and the operation against Ramadi made it worse.”

A member of a "sophisticated cocaine trafficking conspiracy" was convicted Monday in federal court in Denver of conspiring to distribute, and possessing with intent to distribute, five kilograms or more of cocaine, according to prosecutors.

A man who shot two eighth graders at Deer Creek Middle School in 2010, and was found not guilty by reason of insanity to attempted murder, will not be allowed to leave the Colorado Mental Health Institute's grounds without supervision, according to a Jefferson County District Court ruling.

After the San Francisco Bay Area, metro Denver experienced the biggest apartment rent increases this decade in the country. But plenty of new supply should put future rent gains closer to the national average, according to a new report from RealPage, a real estate research firm.