At least 18 people have died in a suicide bomb blast targeting soldiers in the eastern Libyan city of Benghazi.
The explosion struck the al-Guwarsha area west of the city. The BBC was told at least a dozen people were injured.
The area has been the focus of fighting between Islamist militias and troops loyal to Libya's eastern government.
News agencies said an Islamist group, the Shura Council of Benghazi Revolutionaries, said it was behind the explosion.
A security source in Benghazi has confirmed to the BBC that the bombing targeted the headquarters of the 146th Brigade, a security force that has been engaged in fighting against Islamist militias in the city.
Correspondents say it was the fourth vehicle bombing in the city in a week, although the number of people killed from Tuesday's explosion was far higher than in previous attacks.
A witness told Reuters news agency the powerful explosion on Tuesday had reduced a three-storey building to rubble, and that 10 vehicles had been destroyed.
Four field commanders were reported among the dead and the bodies of some soldiers were reported to be trapped under the rubble.
The government began an offensive against the group named Islamic State (IS) in Sirte in May and said recently that it had made its largest gains to date.
Western officials say the number of IS militants in Libya, previously estimated at 6,000, is declining in the face of concerted government action and pressure from other militia.
Libya has become increasingly divided since the fall of Muammar Gaddafi in 2011, with competing governments and rival militias seeking to gain territory and influence.
The chaos had left Libya vulnerable to an influx of IS fighters, many from Syria.
The US has voiced strong backing for the unity government, or Government of National Accord, which began operating from the capital, Tripoli, in April.