Twin car bombs exploded as people left a mosque in a residential area of the eastern Libyan city of Benghazi on Tuesday night, killing 27 and wounding over 30 in an attack timed to cause mass casualties among first responders, officials said.

Capt. Tarek Alkharraz, spokesman for military and police forces in Benghazi, said the first explosion went off in the Salmani neighborhood around 8:20 p.m. Tuesday and the second bomb went off a half hour later as residents and medics gathered to evacuate the wounded.

Local health official Hani Belras Ali said at least 27 people died had died so far and 32 were wounded.

No group immediately claimed responsibility for the bombings.

The United Nations condemned the attack on social media, saying that direct or indiscriminate attacks on civilians are prohibited under international humanitarian law and constitute war crimes.

Libya fell into chaos following the ouster and killing of longtime dictator Moammar Gadhafi in 2011, and since 2014 it has been split between rival governments and parliaments based in the western and eastern regions, each backed by different militias and tribes.

Islamic State fighters had established footholds amid the disorder but have been mostly driven out of the main cities.

Benghazi remains a trouble spot, where bombings and attacks still occur. The city has seen fighting between forces loyal to local strongman Khalifa Hifter, a former U.S.-based Libyan opposition member who leads remnants of Libya's National Army in the east, and Islamist militia opponents.