The small town of Derna in eastern Libya has been making the headlines for the ignomious reason of becoming the most recent bastion in north Africa of the Islamic State group (IS, formerly known as ISIS).
Once famous as a centre of culture, the coastal town is now under the influence of groups openly aligned to the Islamic State group's self-styled "caliph", Abu Bakr al Baghdadi.
|It is incumbent on us to support this oppressed Islamic State that is taken as an enemy by those near and far.
- Majlis Shura Shabab al-Islam
Home to around 150,000 residents, Derna may now be the third IS franchise in North Africa, after Jund al-Khilifa in Algeria and Egypt's Ansar Beit al-Maqdis declared their support earlier this year.
Residents in the town tried to resist the IS takeover, but were overpowered and received scant support.
"The Islamic State is in Derna. It's well documented. There's no doubt," said Othman Ben Sassi, a former member of the now-disbanded Transitional National Council, the political arm of the rebellion that overthrew Gaddafi.
Filling the vacuum
The group is exploiting "the absence of state authority and porous borders," he added.
In June, the Majlis Shura Shabab al-Islam (MSSI), associated with the better known Ansar al-Sharia group, pledged allegiance to IS.
"It is incumbent on us to support this oppressed Islamic State that is taken as an enemy by those near and those far, among the kuffar (infidels) or the munafeqin (hypocrites) or those with marda al-nafous (diseased souls) alike," read part of their statement.
The group first came to the fore in Derna in April when masked members of the group took to the streets wearing military fatigues, brandishing machine guns, rocket propelled grenades and anti-aircraft cannon.
With the display of force they declared themselves the city's new security force, enforcing their interpretation of Islamic law.
A mirror image
"Since making its pledge of allegiance they have set about establishing the trappings of a state in Derna based on the model used by IS in Syria and Iraq," said Aymenn Jawad al Tamimi, Shillman-Ginsburg Fellow at the Middle East Forum.
"From the religious courts and administration to the media campaign, they are adopting the same strategy."
The MSSI has also mirrored the brutality of IS in Syria and Iraq.
In August, the Libyan affiliate posted a video online appearing to show the public execution in a Derna football stadium of an Egyptian man accused of murder.
Earlier in the month, Baghdadi boasted of fresh allegiances across the region in Libya, Egypt, Algeria, Yemen and Saudi Arabia.
"Baghdadi said that the individual identities of the groups would be dissolved and replaced with new IS wilayaat (provinces). What is happening in Derna fits into this," said Tammimi.
How pervasive MSSI control is in the east of Libya is uncertain - as is the level of public support it enjoys.
Despite significant efforts to secure its authority within the town, other local rivals continue to undermine the establishment of an IS franchise in Eastern Libya.
|There is a misguided tendency to associate Islamic courts and the killings of soldiers with an IS agenda.
- Claudia Gazzini, International Crisis Group
For one, the other major Islamist fighting force in Derna, the Abu Saleem Martyrs Brigade, have declared that they are not going to pledge allegiance to any foreign group.
They very much see themselves as part of Libya, and not a trans-border caliphate.
Belal Bellali, a British-Libyan with family in Derna, predicts that the armed groups' strength would eventually fade.
"There will still be a group of extremists who will hold onto this, but people on the ground will reject it," Bellali, a human rights lawyer and activist, said.
According to Claudia Gazzini, Libya analyst at International Crisis Group, some Derna factions have pledged allegiance to IS, but it is unclear which - and how much support they can count on.
"There is a misguided tendency to automatically associate the establishment of Islamic courts and the killings of soldiers with an IS agenda," she said.
Derna has a long-standing history of ties to international Islamist militant movements. In 2007, when US troops in Iraq uncovered a list of foreign fighters for the insurgency there, 52 of the 112 Libyans on the list came from Derna.
The farmlands surrounding the town have also hosted training camps linked to al-Qaeda.
Fighters from the region have also featured prominently in the Katiba al-Bittar al-Libi - the Libyan division in the ranks of IS in Iraq and Syria.
Battle-hardened militants are now affecting the balance of power in favour of IS-affiliated movements upon their return back to Libya, say analysts.
A history of neglect
Derna's prominence is a result of its disenfranchisement and neglect under Libya's former ruler, Muammar Gaddafi, say some. Known for its early opposition to Gaddafi's rule, Derna was punished, and there was little government investment in the city.
"Derna is known in Libya for being a centre of culture," said Tarek Megerisi, an independent analyst specialising in Libyan governance and politics.
"It was famous for its poets and musicians and artists, not particularly for its religion, let alone this."
In the spirit of that civic tradition, residents tried to peacefully protest the extremist takeover of the town in 2013, but demonstrations were violently suppressed.
"They tried to protest peacefully in 2013, and no support came from the capital," Megrisi said. "They were either put down forcefully, or they fizzled out and people were picked up later."