BASHIQA, Iraq -- Shortly after the Islamic State was pushed out of his home town last year, Ivan Abdulla bought a new house in the traditionally Yazidi enclave. It was an investment in the place where generations of his family were raised, he said.
But the father of three already regrets his decision.
The hilltop town of mostly Yazidis and Christians -- two of Iraq's most vulnerable minorities -- has become the focus of a tug of war between the Iraqi government and the Kurdish region since a Kurdish vote for independence last week.
Bashiqa is legally part of Iraq but controlled by Kurdish security forces, and Kurdish officials see it as part of a future state. Once again, the town's future has suddenly been thrown into doubt.
Related: Timeline of ISIS in Iraq
Related: Attacks on Assyrians in Syria By ISIS and Other Muslim Groups
"You can't think long term in this country," Abdulla said. "Whatever plans you set, something happens. Things get ruined."
Bashiqa is one of a handful of towns and cities that could test the Kurdish regional government's fitness for self-rule and the Iraqi government's determination to stop the breakup of the country.
How that conflict plays out will deeply affect the fate of Iraq's ethnic and religious minorities, who have been scattered, massacred and besieged by decades of war -- and more recently, a policy of extermination by the Islamic State. Most of Iraq's minorities live in the swath of northern Iraq that is part of a proposed autonomous Kurdish state.
Christians and Yazidis have left the country in droves in recent years, especially since the Islamic State swept through parts of Iraq in 2014. Yazidis in particular say they were abandoned by Kurdish forces to be massacred and sexually enslaved by the militants.
Both groups believe they would be the biggest losers in a conflict between Baghdad and the Kurdish region.
"Our future is a mystery," said Akram Mansour, 67, a security guard at the historic Mar Korkeis church in Bashiqa. "We're between the hammer of the Kurdish government and the hammer of the federal government."
About a dozen miles northeast of Mosul, Bashiqa was once a quiet place where Yazidis, Christians and a smaller population of Sunni Muslims lived prosperously. Churches and mosques were often built just across the street from one another.
The town, which had a population of about 50,000 before the Islamic State stormed in, provided an outsized contribution to Iraq's economy and culture. The farms nearby produced olives coveted throughout the country, soap and sesame oil. It was also known affectionately as Iraq's Liquor Store because of the factories there that made Arak, an anise-flavored liquor.
After the U.S. invasion, Kurdish peshmerga forces secured the town -- giving Kurdish political parties their first foothold in the Nineveh plains, a cluster of towns and villages with a disproportionately high number of minorities, including Christians and Yazidis.
Bashiqa was one of the few places in Iraq where Yazidis didn't live in cloistered communities. Their isolation in other areas left them particularly vulnerable to the Islamic State, and their plight drew the U.S. military back into Iraq.
The peshmerga withdrew from the town of Sinjar one night in summer 2014, leading to a massacre of Yazidis and the enslavement of thousands of women by the Islamic State. Days later, the peshmerga left Bashiqa, and Yazidi and Christian families were forced to flee on their own.
Peshmerga forces backed by U.S. airstrikes defeated the Islamic State in Bashiqa in November last year.
Today, the Iraqi government is responsible for public services in Bashiqa. Electricity is unreliable and tap water flows intermittently. There is one garbage truck, and trash piles up. A single crew of three men with a wheelbarrow and shovels fills roads cratered by airstrikes during the fight against the Islamic State.
Older retirees receive their pension from the Iraqi government. Many of their adult children are employed by the Kurdish government, these days mostly in the police forces and military that patrol the streets. Distrust of both sides is high.
But the town's abandonment by the peshmerga has left the deepest wound.
"It was such a miserable moment," Abdulla said. "We left loved ones not knowing if we'll ever see them again."
As part of their campaign for independence, Kurdish officials have said their record of protecting Iraqi minorities is far superior to Iraqi government efforts. But in recent months, Yazidis and Kurdish forces have clashed, and few basic services have been restored in disputed towns controlled by the Kurds.
Bashiqa bears the scars of the war against the Islamic State. Many houses remain caved in by explosions and some buildings are still marked with graffiti exalting the extremist group's leader, Abu Bakr al-Baghdadi. The town is still half-empty, its residents scattered as refugees in Europe or living in camps throughout Iraq.
But some have returned, preferring a nearly vacant town still creaking back to life to living among strangers elsewhere.
"This is my home," said Bassam Mahmoud, a 50-year-old Yazidi shopkeeper. "This is the home of my grandfathers and their grandfathers. We are Iraqis, but we belong only here."
That sense of belonging has been challenged by a surge in attention by Kurdish officials, who did more talking than listening when they came to town, residents said.
Ahead of the Kurdish referendum, the top spiritual leader of the Yazidis, Baba Sheikh Khurto Hajji Ismail, said he maintained "a policy of neutrality," saying the issue is "for Kurds only to decide."
Weeks before the referendum on Sept. 25, Kurdish authorities decorated the streets with Kurdish flags, and massive posters bearing the face of the Kurdish regional president, Masoud Barzani, were draped over buildings.
Residents said the message was clear: that nothing less than a "yes" vote for Kurdish independence was expected.
"It doesn't matter whether you vote yes or no. No one knows where these ballot boxes are going," Mahmoud said. He voted "yes" anyway, he said.
"Don't forget, there are people watching," he said. "All the people here are peshmerga."
Zuhair, a 33-year-old Yazidi peshmerga fighter, said he and other peshmerga soldiers were bused to a polling station outside of Bashiqa, where they voted under the watchful eye of senior commanders.
"It hurt," said Zuhair, who declined to give his full name out of fear of retribution. "I am a member of the peshmerga, who left my people without even weapons to defend themselves in Sinjar. But how can I leave them? How would I live? I need the salary."
Kurdish election authorities did not release results from the referendum showing how people in disputed areas voted.
Bashiqa's residents say they are bracing for a fresh round of armed conflict. The town not only would sit on the border between two hostile neighbors, but also is a site of oil exploration.
Even if the Kurdish bid for independence ultimately succeeds through negotiations, the residents of Bashiqa say they have little faith they would be fully embraced by a Kurdish state.
"In every scenario, we are the ones who will be suffering. People built entire lives here over generations and overnight lost everything," Mahmoud said. "It's back to zero and we expect this will happen again."
Abdulla, the new homeowner, said that "there's an inner peace missing."
"The most I can hope for now is that no one knocks on my door telling us we must leave," he said. "That's it."
Mustafa Salim contributed to this report.