Kurdish Peshmerga fighter keeps watch at Omar Khaled village near Tal Afar, west of Mosul August 24, 2014. Old hostilities between Arabs and Kurds exacerbate fighting with the Islamic State. (Youssef Boudlal/Reuters)

Kurdish fighters are struggling to hold on to recent gains against Islamic State militants in Iraq in the face of constant shelling and sniper fire. But Kurds say the jihadists have another weapon: local Arab sympathizers.

The Kurds suspect area Arabs have backed the militants in battles that have raged in Iraq’s north over the past month, including a stunning advance by the jihadists. The fighting has displaced thousands of families in a region long known as a flash point for Arab-Kurdish violence. Now many Sunni Arab residents are barred from coming home.

“The Arabs here stabbed us in the back, and now they are threatening us” from the villages nearby, a Kurdish intelligence officer, Ahmed Hawleri, said from the front-line district of Gwer.

About 30 miles from the city of Irbil, Gwer offers a glimpse into how the fighting has intensified the ethnic divide in some communities. The town was a diverse community of roughly 10,000 before Islamic State gunmen seized it on Aug. 7. Arabs and Kurds had lived side by side despite tensions that lurked beneath the surface.

Now the desolate landscape of shuttered shops and toppled power lines is a military and ethnic fault line.

On Sunday, a battle between the Kurdish forces and Islamic State militants lasted for 24 hours, making it the longest continuous gunfight since Kurds took back Gwer earlier this month.

“The battle isn’t over. They could attack us at any time,” a Kurdish commander in Gwer who gave his name only as Maj. Barqi said Sunday.

As he spoke, his unit cranked out round after round of heavy machine-gun fire from the single mounted weapon the fighters use to defend the district, along with a handful of aging assault rifles. “It’s like we are fighting a state,” he said of the Sunni extremists just a mile away who lobbed mortar rounds at his troops in return. “A state with a very strong army.”

The Islamic State militants seized the northern city of Mosul and a broad swath of northern and western Iraq in June, and followed up two months later by moving on Kurdish-controlled territory, threatening Irbil, the capital of the Kurds’ semiautonomous zone. That prompted the U.S. military to launch airstrikes and help push the militants back.

The U.S. government and several European nations have since pledged to arm the Kurds, but most of the weapons have yet to arrive. The Kurdish troops, known as pesh merga, are worried they don’t have enough arms to keep the militants at bay.

But simmering ethnic discord between Arabs and Kurds, long an issue in northern Iraq, is also feeding the unrest in places like Gwer.

Divisions widen

Over decades, a succession of Arab regimes in Baghdad repopulated Kurdish areas in the north with Arab families from elsewhere in the country.

When the Kurds gained more autonomy with the 2003 downfall of Saddam Hussein, they encouraged their brethren to return to those areas — but at the expense of Arab residents who in some cases were pushed out.

Now these rifts “will be hardened by the conflict,” said Wladimir van Wilgenburg, an Irbil-based expert in Kurdish politics at the Jamestown Foundation, a think tank in Washington. “Of course, if there were these tensions before, it just makes the divisions stronger.”

In recent weeks, many Sunnis across Iraq did pledge allegiance to the Islamic State, either out of support for its goal of an Islamic caliphate or because of long-standing grievances against the Shiite-led government in Baghdad. The national government led by outgoing Prime Minister Nouri al-Maliki, a Shiite politician, had grown increasingly sectarian, oppressing and angering Iraq’s Sunni tribes.

But some displaced Sunni

Arabs did not aid Islamic State fighters and worry that their exile will be permanent.

Raed Ibrahim Abdullah is a resident of Gwer but now lives in a tent on the militant-ruled front line. He said he was not a supporter of the Islamic State.

“I don’t want electricity; I don’t want water,” he said in a telephone interview. “I just want to go home.”

Just south of Gwer, in the mixed town of Makhmour, Kurdish residents claim that their Arab neighbors either aided or joined Islamic State extremists when they took the town this month.

“My good friend, he disappeared after Daash arrived to Mosul in June,” said a Kurdish resident, Soran Saber, using an Arabic nickname for the Islamic State.

“Then we found him dead with their fighters in Makhmour” when Kurds reclaimed the town, he said. “I was glad to see him dead,” he added. “He betrayed us.”

Pesh merga fighters now have a tenuous hold on Makhmour, and some Kurdish families have returned.

The Arab residents, they say, fled to the militant-controlled villages on its outskirts. But, as in Gwer, Kurdish authorities have prohibited Sunni Arab families from coming back.

“They can’t return. This is Kurdish territory now,” said another pesh merga commander in Makhmour, Sgt. Sitar Qahar Ibrahim.

The Kurds are fighting a fierce battle with Sunni militants just three miles from the edge of Makhmour.

Sgt. Muzaffer Khailani, a pesh merga fighter outside Makhmour, said his unit had entered a neighboring town earlier in the week but was ambushed by Islamic State fighters.

“They fired mortars at us. We had to withdraw,” Khailani said.

Part of the group retreated to a checkpoint in Makhmour, he said, but that still comes under fire from militants.

“It’s in our hands now,” Khailani said of Makhmour. “But nobody knows when it might fall into their hands again.”

Salar Salim contributed to this report.