The Islamic State has seized hundreds of tribesmen from a central Iraqi town after accusing tribal leaders there of plotting a rebellion against the militant group, residents and officials said, raising fears that it plans to kill the hostages as punishment.

Residents of militant-controlled al-Alam — about 100 miles north of Baghdad — said the Islamic State has detained as many as 500 men and boys from the Jubouri tribe since Sunday, after some youths tore down the group’s signature black banner from a square in the town center and replaced it with an Iraqi flag.

The act of defiance angered Islamic State militants, who snatched Jubouri tribesmen from their homes, residents said. Relatives and officials said they do not know where the captives are being held — or whether they are even alive. In recent weeks, the Islamic State has massacred more than 300 members of the Sunni Albu Nimr tribe for resisting the Sunni group’s advances in western Iraq. Jubouri tribesmen, who are also Sunni, are worried that their relatives will meet the same fate.

“It is clear they want to take their revenge against us like they did against Albu Nimr,” said Sheik Jabar al-Jubouri, a tribal leader from al-Alam who fled to a government-controlled city to evade the mass arrests.

Since the crackdown began, Jubouri residents of al-Alam have taken refuge in the countryside or in nearby mountain ranges, where Iraqi forces still patrol. Inside the town, the militants have demolished many Jubouri family homes and are forbidding shopkeepers from doing business with the tribe’s members.

“We never accepted the Islamic State, so we were always under threat,” said Jubouri, the sheik. “They just needed an excuse to go after us like this.”

The Jubouri tribe makes up the majority of the population of al-Alam, which fell to the Islamic State shortly after the group captured the nearby city of Tikrit in June.

The jihadists, who went on the offensive in Iraq last summer, now command wide tracts of land in Iraq and Syria. Islamic State leaders have declared a caliphate in the territories under their control.

Al-Alam’s residents fought the militants for a few weeks in June but were eventually outgunned. The tribesmen acquiesced to an uneasy peace, residents said, and some tribal leaders fled. In the past four months, the militants have imposed a strict version of Islamic law, forcing women to cover their faces and setting up sharia courts.

So when U.S. and Iraqi officials recently raised the prospect of arming Sunni tribes like the Jubouri to fight the Islamic State — in what would be a revival of a strategy that worked to end the 2006-2007 al-Qaeda in Iraq insurgency — the militants in al-Alam became immediately suspicious.

Then the Jubouri youngsters removed the Islamic State banner.

“They thought it would be the beginning of a revolution against the Islamic State there,” said Sheik Mounir Hussein Ali, a member of the council of Salahuddin province, where al-Alam is located.

After that incident, the militants began raiding Jubouri family homes on foot, 30 to 40 at a time, witnesses said. Initially, the extremists reportedly checked identification cards before detaining Jubouri tribesmen and marching them off to checkpoints.

After a couple of days, the militants started arriving in buses and trucks large enough to cart away dozens of prisoners at a time. Witnesses said the militants would order women to stay away from their homes and would confiscate any cash before blowing up the house.

One Jubouri elder who remains in al-Alam and spoke on the condition of anonymity for security reasons said the militants have arrested more than a dozen of his relatives, including a 12-year-old nephew.

“No one from our tribe is safe,” he said.

None of the local Islamic State leaders have formally contacted tribal elders to negotiate the prisoners’ release or provided information about their whereabouts, residents and officials said.

Some Islamic State foot soldiers, many of whom are from Tikrit, residents said, told locals that the prisoners were taken to the vast presidential palace complex in that city.

The group has used the site, which is 12 miles from al-Alam, as a prison complex in the past. According to an investigation by New York-based Human Rights Watch, the Islamic State carried out mass killings of Iraqi soldiers there this summer.

There is no evidence that the group has massacred the Jubouri detainees. But Hashem al-Hishami, an Iraqi researcher and expert on the Islamic State, said the militants would not hesitate to kill the tribesmen.

“They consider themselves to be a state power, and they arrested people who were not obeying their laws,” Hishami said. “What else would they do with them?”

Mustafa Salim contributed to this report.