The entrance to Tripoli’s Corinthia Hotel, a day after it was targeted by a car bomb. PHOTOGRAPH BY HAZEM TURKIA/ANADOLU/GETTY

Amid reports that the Islamic State in Iraq and al-Sham (ISIS) was finally beaten back from the Syrian-Turkish-border town of Kobani, and of threats and negotiation offers from ISIS hostage takers, came the news, on Tuesday morning, of an attack on the Corinthia Hotel in Tripoli. Two gunmen, or possibly three, blasted their way into the hotel, shooting at whomever they saw. Ten people, five of them foreigners, were murdered. One American, identified as David Berry and said to be a former Marine working for the Virginia-based security firm Crucible, was among those killed. Security forces working for Libya Dawn, the coalition of militias that currently holds power in Tripoli, sealed off the hotel and went after the attackers. One of the jihadists is said to have blown himself up, and another is said to have died in a gun battle. It is unclear what happened to the others.

The Tripoli Province, a Libyan affiliate of ISIS, claimed responsibility during the attack, and said that it was being carried out in retaliation for the death of Abu Anas al-Liby, a Libyan Al Qaeda agent. Al-Liby, who was suspected of involvement in the 1998 bombings of the U.S. Embassies in Nairobi and Dar es Salaam, which killed two hundred and twenty-four people, was captured in a U.S. Special Forces raid last year and taken to the United States to face trial on terrorism charges. Al-Liby, who was reported to have liver cancer, died in a hospital earlier this month, before he could stand trial.

The Libyan ISIS affiliate had been developing for some time. Since 2011, hundreds of Libyans have travelled to Syria to fight Bashar al-Assad’s regime, and have joined either Jabhat al-Nursra, the Al Qaeda affiliate there, or ISIS. Many of those fighters reportedly have returned to Libya since last summer, in order to establish an ISIS affiliate. The Tripoli Province announced itself in October in the eastern city of Derna, a longtime center of jihadism. In recent months, via social-media communiqués, the group claimed to have opened chapters in Libya’s lawless south, as well as in Tripoli. Recent attacks for which the group has claimed responsibility have included the abduction of a group of twenty Coptic Christian Egyptians, in the city of Sirte; the decapitation of several media activists in Derna; and, several weeks ago, the murder of ten soldiers at a remote desert outpost in Libya’s deep south.

Until the hotel attack, the situation in Libya had been out of the public eye for months. Most foreigners, including almost all Western Embassy workers and journalists, left the country last summer, when fighting broke out between militias in the capital. The conflict caused the country to be divided between two competing power centers: the Islamist-dominated Libya Dawn holds Tripoli and the nearby coastal cities Misrata and Sirte; the anti-Islamist Dignity government is based in the eastern cities Tobruk and Bayda.

When I met with Libya Dawn officials in Tripoli last month, they made efforts to deride and downplay the ISIS presence there. Prime Minister Omar al-Hassi told me that the ISIS adherents were little more than a gaggle of youths, and suggested that “development projects to create employment” would be an adequate response to their extremism.

The Corinthia attack will put an end to these denials by the Islamists in government. Much like the Charlie Hebdo murders in Paris and the Mumbai attacks of 2008, the raid showed what a small group of men with weapons and a disregard for human life can do. Officials in Tripoli should also be concerned that, according to a second ISIS communiqué, issued after the assault, the attackers included a Tunisian and a Sudanese member, a sign that international jihad is seeking a roost in chaotic Libya. (In October, the Times reported that as many as three thousand Tunisians had travelled to Iraq and Syria to join ISIS, a larger number than have come from any other country.)

The Corinthia, a five-star hotel overlooking the harbor, is well known in Libya. When Muammar Qaddafi’s government collapsed, in August, 2011, it became a diplomatic hub, where revolutionaries and journalists slept and worked as the city around them fell apart, and had only intermittent electricity and water. Early on in the chaos, I spent a couple of nights sleeping on the lobby floor, along with scores of other latecomers. Apparently, the Corinthia remained a base for Libyan officials, as well as for visiting foreign delegations. Even Prime Minister al-Hassi is said to live there, although he reportedly was not present at the time of the attack.

To the extent that the Libya Dawn government, despite its denials, has been operating in coördination with extremist groups like Ansar al-Sharia—blamed for the assassination, in 2012, of U.S. Ambassador J. Christopher Stevens—the hotel attack will be an embarrassment. It may even hasten the disintegration of the Libya Dawn coalition, which includes moderate as well as more hardline Islamists. There are already tensions between some of these groups over policy questions—specifically, whether to engage in a United Nations-led process to end the civil conflict.

Whatever the outcome, the Corinthia bombing is a harbinger of more violence in Libya, with its competing governments and myriad rival factions—all armed to the hilt.