(Adds quotes and background)
WASHINGTON, May 27 (Reuters) - The State Department on Tuesday told U.S. citizens in Libya to leave immediately, warning that the security situation in the country was "unpredictable and unstable."
"The Department of State warns U.S. citizens against all travel to Libya and recommends that U.S. citizens currently in Libya depart immediately," the State Department said in a new travel warning.
"Because of the presumption that foreigners, especially U.S. citizens, in Libya may be associated with the U.S. government or U.S. NGO's, travelers should be aware that they may be targeted for kidnapping, violent attacks, or death. U.S. 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 traveling 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 U.S. Ambassador Chris Stevens and three other Americans died.
Mohamed Zahawi, who heads the Benghazi brigade of Ansar al-Sharia, accused the United States on Tuesday 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.
(Reporting by Lesley Wroughton; Editing by Peter Cooney)