Two members of Libya's security forces were killed and five wounded on Sunday evening in a car bombing at a checkpoint in the country's south, a police source said.
"A car bomb exploded as it was crossing a roadblock set up by the security forces" in the city of Sebha, a police official said.
Sebha is about 750 kilometres south of the capital, Tripoli.
Local media showed images of badly damaged security vehicles surrounded by debris.
ISIS claimed responsibility through the extremist group's Nasheer news agency, which posted on Telegram late on Sunday.
The group said one of its fighters, Muhammed El Muhajer, drove into a checkpoint in a car wired with explosives.
Interim Prime Minister Abdul Hamid Dbeibah wrote on Twitter that it was a "cowardly terrorist act". Mr Dbeibah offered his condolences to the families of the victims.
"Our war against terrorism continues," he said.
Sebha, capital of the southern province of Fezzan, is controlled by forces loyal to eastern-based Libyan National Army chief, Field Marshal Khalifa Haftar, and has been the scene of several extremist attacks in recent years.
Meanwhile, the Libyan Red Crescent said on Sunday that unidentified assailants abducted one of its local officials several days ago in the eastern city of Ajdabiya.
Mansour Al Maghrabi, head of the Red Crescent's Ajdabiya branch, was taken on Thursday, branch secretary general Marii Al Dersi said.
"We lost all contact with the director on Thursday when unknown [assailants] forced him from the LRC headquarters in Ajdabiya," Mr Al Dersi told AFP.
Authorities have opened an investigation, a security source in Ajdabiya said.
"A search is under way to attempt to locate him and know the details" of his abduction, the source said.
The UN Support Mission in Libya expressed concern for Mr Al Maghrabi's safety.
He "was abducted on June 3 when his car was intercepted by unknown armed men and his whereabouts remain unknown", it tweeted on Saturday.
"The mission calls for his unconditional release," it said, urging a "transparent investigation into this enforced disappearance".
Ajdabiya is also controlled by Field Marshal Haftar's forces.
Libya is seeking to extricate itself from a decade of chaos and conflict that followed the toppling of dictator Muammar Qaddafi in a 2011 uprising that led to Nato intervention.
A formal truce signed last October between rival camps in the country's east and west led to the creation of an interim government that was given the task of preparing the country for December polls.
But the security situation remains precarious despite the ceasefire and progress on the political front.