DOHUK, Iraq — On the outskirts of this Kurdish city, visitors came to a small cabin to pay respects to the family of three dead shepherds. Their relatives had fled their homes near the town of Sinjar after it was liberated from the so-called Islamic State last month. The dead men were Muslim Kurds who had stayed behind under ISIS control for more than a year, and the local Yazidi fighters, who saw them as guilty of betrayal, killed them for revenge.

When Sinjar fell to ISIS in the summer of 2014, the spectacle of thousands of Yazidis fleeing to the mountainside to escape a savage pogrom prompted the United States to re-enter the war in Iraq, in an effort to save them. But those who could not be rescued suffered horrible fates. ISIS kidnapped thousands of Yazidis, mostly women and children, and murdered hundreds of men from the minority religion in a brutal campaign of persecution. ISIS sold the women into slavery and put prices on them “like animals being sold in a market,” said one Yazidi tribal leader. The United Nations has said the ISIS crimes may amount to genocide.

A 41-year-old Kurdish Muslim man we’ll call Sadiq Saleh, because he requested anonymity, said that he stayed in the town of Qabusiya, near Sinjar, when it was taken by ISIS in order to take care of his livestock. While he was there he worked with the Kurdish forces planning to retake the town, he said: “We knew if ISIS finds informants they would behead them, but we continued to send information.”

After Sinjar was indeed retaken by forces from Iraq’s Kurdish Regional Government known as Peshmerga and Yazidis serving with them on Nov. 13 this year, Sadiq decided to flee with his animals. His family had already safely crossed the battle lines and traveled to Dohuk in the northern Kurdistan region. On Nov. 22, Sadiq and 14 other men tried to make the same journey with around 4,000 sheep. They were under the armed protection of the Kurdistan region’s security forces.

Sadiq and three other relatives said that they were ambushed by Yazidi fighters. The armed Yazidis demanded 20 sheep, then began shooting around 4:30 in the afternoon. Three men from his family were killed in the ambush. Zuhair, 21, was the closest to the attackers and the first one to surrender, his family said.

“He raised his hands and said, ‘I’m just a shepherd, I have no gun,’” but the attackers responded, “Many Yazidis were killed by ISIS so we will kill all of you,” Sadiq recalled. The shooting began and the other men hid between the sheep as Zuhair was gunned down.

A few days later Sadiq tried to transport his sheep again, when Yazidi fighters blocked his way for a second time, he said. There was a firefight between the Yazidis and men from the Zerevani, one of the Kurdistan region’s security forces who were protecting the shepherds. Three Yazidi fighters were killed.

Kurdish Peshmerga Lt. Khero Khider said that 600 Sunni Kurds had crossed over the front line under Peshmerga protection, and confirmed that three civilians were killed by Yazidi fighters and that in the second incident three Yazidi fighters were killed by the Zerevani.

The outbreak of vendettas in post-liberation Sinjar shows the difficulty of controlling the area while locals seek retribution for ISIS crimes, and the erosion of trust between former neighbors—a consequence of the war with ISIS across Iraq and Syria.

“Sinjar cannot be a place for coexistence if someone kidnaps and rapes your children, kills your brother—you cannot live with them again,” said one Yazidi tribal leader speaking from his sparse tent on Sinjar mountain. He accused local Muslims who stayed in ISIS areas of supporting the group.

“The protection of the Peshmerga for these families makes us very unhappy because they are our enemies,” he said. The tribal leader said that 31 members of his family had either been killed or were still being held captive by ISIS and his village is still under ISIS control. “Our homes are caught between airstrikes and ISIS fire and destroyed by both,” he said.

Back in the recently retaken city of Sinjar, homes lay with their insides exposed, spewing concrete rubble and household objects onto broad, quiet streets. A roaming fighter passed gingerly, a weapon slung on this back as he stepped over fallen cables, smashed windows and children’s toys. The air still smelled of burned metal and rubber. The whir of planes could be heard in the cold, bright winter sky above.

On the day The Daily Beast visited, the U.S.-led coalition against ISIS carried out two airstrikes near Sinjar. They hit “two ISIL tactical units and destroyed an ISIL fighting position and an ISIL vehicle,” said the U.S. Central Command, using the U.S. government’s acronym for the self-declared Islamic State.

Yazidi Peshmerga Col. Jidaan Darush Jadan sat in the office of a school in the middle of the town. The building was miraculously unharmed. By his desk still stood a glass cabinet of golden trophies won by the students—a reminder of better times. But spread out on the desk was a battle map. He pointed out the curve of the ISIS front line, wrapping around the main highway from Syria to Mosul, the second-largest city in Iraq, which is under ISIS control.

He said that the incident with the sheep was a tribal dispute that his commander had resolved. He added that he didn’t want to focus on these kinds of incidents and instead called on the international community to come and help to rebuild Sinjar, but then he added that the sheep probably originally belonged to the Yazidis.

He said that local Arabs would not be allowed back to Sinjar. Yazidis accuse local Arabs of siding with the militants. “How can we let them back?” asked the colonel. “They lived with us for 100 years but they stabbed us in the back. They took our women and raped them. Arabs who lived here either helped ISIS militarily, financially or supported them ideologically.”

Speaking in the streets of Sinjar outside the burned homes of his Yazidi relatives and one Shia family (the house had been marked “Shia” in an effort to prevent revenge looting targeting Sunnis), Sulaiman Omar, 37, a Yazidi fighter acknowledged that not all Muslims were guilty. “We don’t have problems with other groups coming back, our concern is with those who helped ISIS and betrayed us. We can’t forgive them and they won’t be allowed back.”

Another Yazidi fighter said that he, too, would have fought the family with the sheep and prevented them from entering Kurdistan. He raised another point. He said that in the future “there definitely will be problems” between the Yazidis and Kurdish forces that they believe abandoned them. “Half of my family are still with ISIS,” he said.

In Dohuk at the wake for the shepherds, Sadiq’s family looked shaken. A relative living in Dohuk, Khazi Hamid, 43, said the family had helped Yazidi women escape from ISIS by giving them the clothes belonging to their own daughters and telling them which way to go.

Abu Diler, a pseudonym because of the sensitivity of the subject, is a Sunni Kurd from Sinjar and former head teacher. He lived under ISIS control for one and a half months before leaving because of the lack of schools and health care in the militants’ self-anointed caliphate.

He said he saw ISIS killing Yazidis as he rescued his family. “I was upset when I saw the killings,” he said, “The Yazidis didn’t commit any sin, ISIS just killed them based on their ID.” He said that ties between different religious and ethnic groups in Sinjar used to be good. He cited an example of the imam at his local mosque who smuggled his Yazidi neighbor out of the “caliphate” by pretending he was a Muslim.

“ISIS works under Islamic propaganda,” said Khazi in the metal cabin where the family were sheltering. “The Yazidis don’t differentiate between us and ISIS, they say Muslims are all ISIS.” The Daily Beast asked Abu Diler if he would go back to Sinjar. “I can’t because it is not safe,” he said. “The Yazidis are there and they are all armed. Either they will kill us or we will have to kill them.”