The invaders pinned notices on the walls of mosques informing residents that they now lived in the Islamic State of Iraq.
For the last year, U.S.-led forces have pursued the militants from one stronghold to the next in Diyala, a province of winding waterways and abundant farms stretching north and east from Baghdad to the Iranian border. They have captured or killed hundreds of people, most said to be members or affiliates of the militant group Al Qaeda in Iraq. The American-led troops have destroyed weapons caches, training bases, bomb-making factories and torture houses.
Yet the Sunni Arab militants identified by many U.S. commanders as their most lethal enemy and the greatest obstacle to stability in Iraq continue to flow into the province and farther north to the regions of Mosul and Kirkuk.
This is not the only place that the militants have established a haven, but the U.S. deems success here as crucial to its efforts to consolidate recent security gains as American troops begin to draw down.
Diyala sits at a strategic crossroads, providing access to Baghdad, Iran and insurgent strongholds in northern Iraq. Its isolated hamlets, thick palm groves and fragrant citrus orchards provide a multitude of hiding places from which the militants unleash gruesome strikes.
Residents say that those who disobeyed the militants were stuffed into cars and brought before religious courts.
"If they don't bring them back in 10 days, that means they are dead," said Ali Jumaa, an aging farmer with a thin mustache, who lives with his wife in a house fronting a canal in Thanira. "They don't return the body."
The U.S. military says Al Qaeda in Iraq is led by foreign fighters. Its Jordanian founder, Abu Musab Zarqawi, was killed in a U.S. airstrike outside Baqubah in 2006. But the military says the foot soldiers are mostly Iraqi, citing detailed ledgers recovered from an insurgent base showing local recruits, one of them just 16.
At first blush, the province would not seem the most obvious place to center a self-styled Islamic caliphate. Unlike the militants' previous stronghold in overwhelmingly Sunni Anbar province, Diyala is a volatile mix of sects, tribes and ethnicities. But the province is also home to thousands of former officers in Saddam Hussein's army, many of whom found themselves without jobs, pensions or a future after the dictator's ouster.
Similar dynamics are found in Mosul, where the Iraqi government has also announced its intention to rout Sunni extremists. With the military push in Diyala province, U.S. and Iraqi officials believe many fighters have fled to Mosul and elsewhere.
"When Al Qaeda got here, they gave them a choice: 'Either you are with us, and we will pay you, or you are against us, and we will kill you,' " said Col. Qais Shahab Ahmed, who commands the police rapid response unit in Muqdadiya, the main commercial center along the Diyala River valley, northeast of the provincial capital, Baqubah.
Local officials say the insurgents paid up to $100 for each tip they received, including ideas about where to hide and information about U.S. and Iraqi troop movements. For the families who supported them, there were also gifts of rice, sugar, and chocolates for the children, villagers said. For those who resisted, retribution was swift and brutal.
When word spread recently that some Sunni and Shiite tribesmen were joining forces with the U.S. military to fight the militants in Baqubah and Muqdadiya, the gunmen began leaving severed heads of those they deemed collaborators along rural roads as a warning to others.
"If you saw the people who cut off people's heads, you would never believe they were capable of this," Ahmed said. "Most are under 18. If you ask them, 'How can you do this?' they will say, 'I don't know. They just gave me a weapon, and I did it.' "
Iraqi officials say the militants are adept at exploiting the poverty, ignorance, resentment and fear in these isolated villages, a patchwork of Sunni and Shiite enclaves.
Sunni residents in the region feel trapped, said Maj. Fuad Farouk, a Sunni who commands a detachment of Iraqi soldiers positioned between the Sunni village of Abu Gharma and Shiite Abu Sayida.
Few Sunnis here trust the Shiite-dominated government security forces, who they say treat Sunnis as terrorists and extort money at checkpoints. So Sunnis were easily lured by Al Qaeda in Iraq's promises to protect them, Farouk said.
Until recently, U.S. soldiers were stationed with Farouk's forces, and he proudly recounts the battles they fought together against insurgent gunmen. But since the Americans handed over the outpost southwest of Muqdadiya to the Iraqis, Farouk says, his soldiers have been hopelessly outmanned and outgunned.