A suicide bomber ploughed a car filled with explosives into the main security checkpoint in Misrata.
Five people were killed and eight wounded with several cars and nearby shops damaged by the blast on Misrata's western checkpoint at Dafniya early on Sunday morning (31 May).
An official source told Al Wasat newspaper that the explosion blew apart the gate.
The Dafniya checkpoint marks the entrance to Misrata from the Libyan capital, Tripoli. It is a key point for ensuring the city's safety.
A soldier with a bandage on the back of his head told Channel 4 News that he'd been at the side of the road when the vehicle careered through, refusing to stop. "I saw the driver," he said. "He was a young man. Then it exploded."
The location of the attack suggests that the bomber came from the west of the city, meaning that IS has operational cells between Tripoli and Misrata.
This is the second suicide mission by IS on a Misrata checkpoint in ten days, according to the Libyan Herald. On 21 May, two guards were killed and three others wounded when a suicide bomber blew himself up at Checkpoint 60, in the southern part of the city.
The elected government, including an armed force led by General Khalifa Haftar, has been exiled to the east of the country since losing control of Tripoli last August.
"We will support all army, police and revolutionary forces to fight and chase those apostates who have come to Libya claiming they are representing Islam," Libya's rival prime minister, Khalifa Ghwell, told Reuters.
"Islam disowns them," he said.
The alternative government, composed largely of men from Misrata and the Muslim Brotherhood, is based in Tripoli. Although both sides are facing a threat from Islamic State, instead of joining forces, they are fighting each other.
"The biggest enemy are these killers and terrorists and Haftar their leader," Ghwell said. "He's the cause of these problems – he and the counter revolutionaries."