A suicide bomber killed four people outside Libya's militia-controlled third city Misrata on Sunday in an attack claimed by the Islamic State group.
The LANA news agency of the militia-backed Tripoli administration said 21 people were also wounded when the bomber blew up a vehicle packed with explosives at the Saddada checkpoint east of the city.
IS radio Al-Bayan said a Sudanese volunteer it named as Abu Dujana had carried out the attack on behalf of its Tripolitania branch.
The jihadist group, notorious for its brutal rule of swathes of Iraq and Syria, has established branches in all three of Libya's historic regions.
In February, the Tripolitania branch posted grisly video of the beheadings of 21 Christians, mostly Egyptians, prompting Cairo to launch retaliatory air strikes on jihadist targets in the North African country.
In January, the group claimed an assault on a luxury hotel in the capital popular with diplomats and officials in which at least nine people -- including five foreigners -- were killed.
The country has had two governments and parliaments since the Libya Dawn militia seized Tripoli in August and the internationally recognised government fled to the country's far east.