MISURATA, LIBYA -- One day in July, Ahmed Salem Abdul Salam’s parents got the call they had yearned for and dreaded at the same time: 29-year-old Ahmed, who had disappeared weeks earlier near his home town of Sirte, on Libya’s central coast, was alive. But he was being held by Islamic State militants, and they believed he was a spy.

Militants from the extremist group, which had raised its flag in Sirte earlier this year, showed Ahmed’s father a video in which his son appeared to confess to aiding opposing forces in the nearby city of Misurata. But don’t worry, they told him, Ahmed would undergo trial by an Islamic State sheik and would probably be acquitted. “He’ll be freed by sunset at the latest,” they said.

The next day, Ahmed was dead, strung up on scaffolding in Sirte’s main traffic circle after a public execution. His body remained there for a full day.

This is how justice is delivered in the Islamic State’s new capital along Libya’s Mediterranean coast. Officials suspect that up to 1,200 jihadists are now fighting in Sirte under the banner of the Islamic State. They are part of one of three "provinces" the group has established across Libya since last year, together making up what the Obama administration believes is the strongest of eight branches the group’s leadership has established across the Muslim world.

In contrast to other Libyan cities, like Derna to the east, the Islamic State has flourished in Sirte in part because it has been able to capitalize on local discontent with authorities in Tripoli and Tobruk, where rival governments are now battling for legitimacy.

The group has also succeeded in co-opting Islamists already in Sirte and attracting foreign fighters from Tunisia, sub-Saharan Africa and elsewhere.

Residents of Sirte, whom The Washington Post spoke with by phone or in person in the nearby city of Misurata, said Sirte remains at the mercy of the well-armed, well-trained jihadists. Particularly vulnerable are men with links to anti-Islamic State forces or militias and those from tribes known to harbor opposition to the Islamists.

“In Sirte, there is no authority, no authority but them,” said one former resident who fled to Misurata this spring.

In the months after Islamic State militants quietly appeared in Sirte early this year, they gradually changed their tactics, going from proselytizing and charity work to more hostile activities.

“We woke up [one] morning and you could feel something was wrong, something was different,” said Mohamed, Ahmed’s brother, during a recent interview in Misurata. “That’s when they started hunting down security forces.”

According to Mohamed, militants used informants to identify those linked to the army or to the militias. He said Ahmed was targeted because, as a Coast Guard official, he made a monthly trip to Misurata to retrieve salaries, which were then distributed in Sirte, raising suspicions that he might be gathering intelligence for Misuratan militias preparing an offensive against Sirte.

After his death in July, the Islamic State released a video showing the alleged confession by Ahmed, an example of the increasingly sophisticated propaganda effort in Libya, building on the success of similar operations in Iraq and Syria.

The Post could not verify the circumstances under which Ahmed made the statements that feature in the video, which also shows the moments after his execution.

His family has now left Sirte, exhausted by the harassment that followed their son’s death and afraid for their own lives. Like other displaced Sirte residents, they are now living in limbo, hoping that Misuratan or even Western forces will rid Sirte of the extremists' rule.

Ahmed’s family was particularly pained by the way the Islamic State treated their son after he was executed. A local hospital, controlled by the Islamic State, refused to accept and clean his body. Militants barred people from attending a funeral at the family home and drove circles around the house to make their presence felt.

“They said, ‘Just bury him and go home,’” Mohamed said. “‘There are no prayers for infidels.’”

Read more: