Libyan officials say suspected Islamic State militants have killed three guards in an attack on a checkpoint outside an "operations room" set up last month to fight IS.

Mohamed al-Shami, a spokesman for the operations room says the Wednesday attack took place midway between IS-controlled Sirte to the east, and Misrata to the west.

Forces allied with an Islamist-backed government based in the capital, Tripoli, founded the operations room last month to coordinate the fight against IS.

Sirte Municipal Council Mayor Mokhtar Khalifa says the attack came a day after an airstrike on Sirte targeting IS positions.

Libya has fallen into chaos since the 2011 toppling and killing of longtime dictator, Moammar Gadhafi.

Since 2014, an internationally recognized government has convened in the far east of the vast, oil-rich country.