When a wave of deadly ethnic violence swept through the northern Iraqi town of Tuz Khurmatu, Ahmed Hassan Majid's house was on the wrong side of an invisible line.
The Kurdish-Turkmen violence ignited by a checkpoint dispute in November has since faded, but divisions between the communities are sharper than ever.
They fight the same jihadist enemy but in areas where their frontlines meet, the autonomous Kurdish region and the Baghdad-backed Shiite paramilitary forces are vying for influence, a contest that sometimes descends into violence.
After clambering over his charred belongings to reach the roof of his house, which was torched during the unrest, Majid pointed to a cinderblock wall that went up recently, dead-ending a street to mark an ethnic border.
"On this side, Kurds. Over here, it's Turkmen," said the 36-year-old father of two.
Majid is a Turkmen Shiite, but the house he spent a quarter of a million dollars on before moving in earlier this year was one of the first Turkmen homes on the edge of the Kurdish district.
As he sat on a plastic chair in the darkness of his gutted home, his eyes drifted into a sorrowful haze.
"It was one of the first to be torched. I have lost everything," Majid said.
In the bridal parlour he ran from a small office attached to his house, a wedding dress survived the destruction.
But Tuz Khurmatu is a divorcing town -- neighbourhood minority residents who were not forced out by fire and threats have spontaneously moved back across the ethnic divide.
In some cases, Kurdish and Turkmen families that were both on the "wrong side" of town traded homes to save having to find a new place to live.
Nihan Bahaeddin's home in the same area was occupied by Kurdish forces at the height of the November tensions but was not burned down.
The 35-year-old biotechnology professor was already displaced once in June 2014 when the ISIS militants group took over the city of Mosul where she was teaching.
"It's dangerous but we had no other choice than to come back. The Kurdish soldiers made a mess but we have no other place to live," she said.
"Tuz is part of Kurdistan" was scribbled on walls in the children's room and hallway, a reference to the Kurds' three-province region that has expanded its territorial control during the conflict with ISIS.
Tuz Khurmatu, about 180 kilometres (110 miles) north of Baghdad, is a major crossroads in Iraq -- a gateway to Kurdistan to the north, ISIS-held territory to the west, Iran to the east and Shiite Arab areas of Iraq to the south.
The word "Kurdish" has been spray-painted on the iron doors of hundreds of shops to prevent them from being burned down.
"Is this what it's come to?" said one shop-owner, speaking on condition of anonymity for fear of reprisals.
According to sources on both sides, around 110 homes and at least 200 shops were torched or damaged during the flare-up last month, about two thirds of them Turkmen-owned.
Shallal Abdul Baban, the Kurdish official responsible for the area, said at least 10 Turkmen and eight Kurds were killed in the violence.
The ethnic tinderbox town has seen several flare-ups over the years, but a dispute at a checkpoint on November 12 was the spark that ignited Kurdish-Turkmen violence that culminated in a firefight inside the hospital and the murder of a surgeon.
A joint committee organised exchanges of detained residents but nobody was prosecuted for the violence.
A report released on Wednesday by Human Rights Watch said civilians were targeted on the basis of their ethnicity.
"They have been carrying out killings, abductions, and widespread property destruction with complete impunity," said Joe Stork, HRW's Middle East director.
The town of about 100,000 inhabitants is now run by two rival forces, the Kurdish peshmerga forces on the one hand, and the Hashed al-Shaabi paramilitary force to which most of the Turkmen Shiites have entrusted their fate.
Many of the Turkmen community's hubs lie in contested areas of Iraq where the Kurds' expanded ambit and the Hashed al-Shaabi's ever-growing influence meet.
Turkmen leaders recently voiced outrage over the Kurdish authorities' digging of a trench along their frontlines with ISIS.
The Kurds insist it is only meant to protect from car bombs, but the Turkmen say it is a political move dividing Iraq.
In Tuz Khurmatu, even those Turkmen residents who are on the right side of the wall could end up on the wrong side of the trench.