SURT, Libya — The Islamic State has established more than a foothold in this Mediterranean port. Its fighters dominate the city center so thoroughly that a Libyan brigade sent to dislodge the group remains camped on the outskirts, visibly afraid to enter and allowing the extremists to come and go as they please.

“We are going to allow them to slip out, because the less people we have to fight, the better,” said Mohamed Omar el-Hassan, a 28-year-old former crane operator who leads the brigade from a prefabricated shed on a highway ringing the city.

“Why make the city suffer?” he said, trying to explain his delay more than 16 days after the brigade arrived in Surt.

Nearly four years after the ouster of Col. Muammar el-Qaddafi, Libya’s warring cities and towns have become so entangled in internal conflicts over money and power that they have opened a door for the Islamic State to expand into the country’s oil-rich deserts and sprawling coastline. Libya has become a new frontier for the radical group as it comes under increasing pressure from American-led airstrikes on its original strongholds in Iraq and Syria.