The State Department has told US citizens in Libya to leave immediately, warning that the security situation in the country was "unpredictable and unstable."

"The Department of State warns US citizens against all travel to Libya and recommends that US citizens currently in Libya depart immediately," the State Department said in a new travel warning.

"Because of the presumption that foreigners, especially US citizens, in Libya may be associated with the US government or US NGO's, travellers should be aware that they may be targeted for kidnapping, violent attacks, or death. US citizens currently in Libya should exercise extreme caution and depart immediately," it said.

"The security situation in Libya remains unpredictable and unstable," the warning added.

The last travel warning on Dec. 12 strongly advised against all but essential travel to Tripoli and against travelling outside the capital.

The warning followed an attack on Libya's parliament, the General National Congress, on May 18 by armed groups, and came as the leader of Islamist militant group Ansar al-Sharia in Libya's Benghazi city warned the United States on Tuesday against interfering in the country's affairs.

Ansar al-Sharia is listed in the United States as a foreign terrorist organization and is accused of orchestrating the 2012 attack on the U.S. Consulate in Benghazi in which US Ambassador Chris Stevens and three other Americans died.

Mohamed Zahawi, who heads the Benghazi brigade of Ansar al-Sharia, accused the United States yesterday of backing renegade former General Khalifa Haftar, who started a self-declared campaign to purge Libya of Islamist militants.

The United States has an embassy in Tripoli but closed its consulate in Benghazi after the 2012 attack.

In its latest warning, the State Department said it would limit staffing at the embassy in Tripoli and offer only limited emergency services to citizens in Libya.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.