Outside the police station, Iraqi men in robes and headscarves wait for permits to leave the dusty border town of Rabia, which was wrested from the Islamic State group 18 months ago but remains isolated and impoverished by the battle lines drawn around it.

To the east is the city of Mosul, still held by IS militants. To the west is the crossing into Syria, but that has been closed by Iraqi Kurdish authorities. The only way out is north to Iraq's largely autonomous Kurdish region, where authorities are suspicious of Rabia's mostly Arab residents and require them to apply to enter.

The isolation is straining the town economy, making it difficult to bring in goods.

"We are living now on livestock alone. There is nothing else," said Sheikh Fadl al-Shammari, a local farmer. "Look at the market. Vegetable prices are going up because of this. Same with other items."

When Iraqi Kurdish forces retook Rabia last year it was a major advance against the Islamic State group, which had swept across northern and western Iraq in the summer of 2014 and declared its "caliphate" across its territory in Iraq and Syria. Now 18 months later, the town demonstrates the difficulties of returning to the way things were before the IS rampage.

The town long relied on cross-border trade, but the crossing into Syria has been closed for months because of the rivalry between Syrian Kurds and Iraqi Kurds. All goods now are imported from the Kurdish autonomy zone, making everything more expensive.

"We hope that our Kurdish brothers will agree among each other because the closure of the border has affected us a lot. We are a border town," said Sheikh Khaled Ahmad Safuq al-Shammari, the town's tribal leader.

Residents are also cut off from the central government in Baghdad. The town's farmers long relied on the central government, which bought their wheat at guaranteed price, higher than the market price, but those payments halted with the IS takeover and haven't resumed. Most municipal employees quit after not being paid for months.

Tribal militias and Kurdish forces provide security in the town, and the Kurds view the Sunni Arab residents with suspicion of being IS sympathizers. The Kurds have barred non-resident Arabs from entering their autonomy zone in the north, but have made an exception for Rabia, though they require permits. Kurdish police say the permits are regularly provided. But residents say the process can take a day or two, the crossing is not always open and security checks extend the journey

"It is not like you just go up there freely, spend a couple of days and come back — no," said Ahmad Dhanoun, a local resident. "You go to the police, and if you have an ill person with you, or you have a case, then they give their approval. Otherwise, no."

A Kurdish security official in Rabia said the procedures were necessary to make sure residents don't represent a threat.

Families displaced from surrounding villages have poured into Rabia. Kurdish authorities have barred residents from returning to some villages because they suspect their Sunni Arab residents cooperated with IS. Rights groups say some villages in the area have been destroyed outright.

Ahmad Arbo Howayit, from a village just north of Rabia, has lived in the town with his family for more than a year, renting a place to stay. He said he's been barred from returning home but no one told him why.

"We don't know what's going on. I guess the government knows," he said.