At the Nuaimiyah military base on the edge of long-troubled Fallouja, Iraqi soldiers often sleep outdoors, gambling that they will be better protected by sandbags than by flimsy, flammable huts as they endure a nightly cascade of mortar shells and fiery flares.
"The walls are corkboard," explained one officer. "They can't withstand anything, so we prefer to sleep in the sandbag bunkers."
Pausing a moment, he added: "When we can sleep at all."
The officer, who refused to be named for security reasons, had good reason to be worried. Less than a quarter of a mile away, in squat gray structures, are Islamic State militants.
Since the U.S.-led invasion of Iraq in 2003, Fallouja, less than 50 miles west of Baghdad, has been a bastion of antigovernment — and anti-American — fervor. U.S. troops were blamed for the deaths of 17 civilians in one early confrontation. And in 2004, the killing of four American security contractors led to repeated efforts to subdue the city.
Then, in January 2014, after the final U.S. withdrawal from Iraq, Islamic militants seized the western Iraqi city, raising their black flag above several state buildings.
The loss of Fallouja foreshadowed the fall of Mosul six months later, when Islamic State overran Iraq's second-largest city in less than 24 hours. Nowhere is the government's challenge in retaking its captured cities better demonstrated than here, as Islamic State conducts daily suicide bombings while also uploading horrific images of government shelling and airstrikes.
At first, the Sunni extremists were not welcomed in Sunni-dominated Fallouja, said Maria Fantappie, an Iraq analyst with the International Crisis Group. Rather, Islamic State was tolerated as an antidote to the excesses of the Shiite Muslim-dominated Iraqi army, which many locals viewed as the equivalent of a Shiite death squad.
"The city's rebels struck a Faustian bargain, forming an alliance of convenience with [Islamic State]," she wrote. "A self-reinforcing cycle has taken root: Jihadi activity encourages government truculence that in turn requires greater jihadi protection."
Residents of the restive Anbar province city are even more wary of Shiite-dominated militias that have been employed by Baghdad to augment armed forces units that collapsed and ran during Islamic State's rampages.
Fighting in and around Fallouja has grown more vicious in recent days, troops say, as the government and supportive militias complete their offensive to defeat Islamic State in and around Tikrit, the hometown of Saddam Hussein north of Baghdad.
"We get more than 15 mortars every day, and we've lost more than 80 guys in the last year with over 100 wounded," said the officer at the base at the southernmost tip of Fallouja.
Security forces here complain of paltry support from the government compared with the lavish supply of heavy weaponry and armor — not to mention thousands of militiamen — in Tikrit.
"Here in the base, we have 2,000 bullets left, and we only get 1,000 bullets every four or five days," scoffed a major who would not divulge his name because he was not cleared to speak to the press. "You could go through that in half an hour with the situation we have here."
He also spoke of rampant absenteeism, with officers seeking to avoid serving in the area.
"We're supposed to have 36 officers in a regiment. Guess how many we have here? Ten," he said with resignation, before confessing he too had sought to leave his post.
Away from the city itself, the security situation was little better.
At the Tareq supply base, four miles southeast of Fallouja, nervous soldiers keep watch in guard towers pockmarked with bullet holes from sniper fire. The threat of Islamic State attacks is omnipresent.
"We get mortars and even Katyusha rockets. This is the 'love' we get from those guys," joked Col. Tareq Nathem, head of transport and supply for the Iraqi army's 1st Division at Tareq.
He received a visiting reporter in his office, an incongruously serene redoubt with three turkeys roaming in an adjacent garden.
"If we don't get attacked all the time, we feel we're lacking affection," continued the colonel, his drooping mustache lowered even further by a weary smile.
As he spoke, windows rattled to the sound of an incoming mortar. Both he and the turkeys seemed unfazed.
Last month, Tareq's forces were augmented by 200 Shiite militiamen, now known as Popular Mobilization Units, from a faction called Hezbollah al Thaaeroon, an Iraqi group that was inspired by, but has no connection to, Lebanon's Hezbollah.
After assisting in the fight against Islamic State in other areas, the group has now dedicated its resources to Fallouja.
"We created the 'Jerusalem Brigade' expressly for Fallouja, and this brigade has 1,500 trained fighters ready to be martyred for the cause," said Abdul Rahman Jazaaeri, the group's leader, in an interview in its Baghdad headquarters.
Head of security Maytham Atwani added, "In all their years here, the U.S. forces weren't able to subdue Fallouja."
"But our group and the other factions went in and did it. That's why Daesh can't advance," he boasted, using the Arabic acronym for Islamic State.
Their optimism, however, was not shared by the regular army units.
"We are now in a state of defense, not offense," said the major at the Nuaimiyah base.
Unlike in northern Iraq, the government has appeared reluctant to deploy the Shiite militias in large numbers in Anbar province for fear of further alienating the majority Sunni population.
Sunnis accuse Shiite militiamen of engaging in reprisal attacks. They also fear a return to the height of Iraq's sectarian bloodletting in 2006-2007, when Shiite death squads killed civilians whose family names identified them as Sunni.
Anbar was the frequent target of forces under then-Prime Minister Nouri Maliki, a Shiite hard-liner. Sunnis complained of religion-based persecution by the army and police, refusing to acknowledge them as state organizations and instead calling them "Maliki's army."
"We have reservations in Anbar about any sectarian action, no matter who does it, whether it's the Popular Mobilization forces or the state apparatus," said Anbar Gov. Suhaib Rawi.
Still, Rawi remains optimistic.
"There are great advances for the security groups on the outskirts of Fallouja," he said, insisting that a strategic bridge between Fallouja and Baghdad was in the control of anti-Islamic State forces.
A week later, three Islamic State suicide bombers attacked the bridge with an armored vehicle, a bulldozer and a dump truck, all laden with explosives. The bridge was destroyed. Fighting continues where the bridge stood.