BENGHAZI, Libya -- The United States has temporarily withdrawn some of its forces from Libya due to "security conditions on the ground," a top military official said Sunday as a Libyan commander's forces advanced toward the capital of Tripoli and clashed with rival militias.
A small contingent of American troops has been in Libya in recent years, helping local forces combat Islamic State and al-Qaida militants, as well as protecting diplomatic facilities.
"The security realities on the ground in Libya are growing increasingly complex and unpredictable," said Marine Corps Gen. Thomas Waldhauser, the head of U.S. Africa Command. "Even with an adjustment of the force, we will continue to remain agile in support of existing U.S. strategy."
He did not provide details on the number of U.S. troops that have been withdrawn or how many remain in the country.
Footage circulating online showed two apparent U.S. Navy transport craft maneuvering off a beach in Janzour, east of Tripoli, sending up plumes of spray as American forces were ferried from the shore.
India also evacuated a small contingent of peacekeepers. The Indian foreign minister, Sushma Swaraj, said the country's 15 Central Reserve Police Force peacekeepers were evacuated Saturday from Tripoli because the "situation in Libya has suddenly worsened" and fighting has moved into the capital city.
The self-styled Libyan National Army, led by Field Marshal Khalifa Hifter, launched a surprise offensive against the capital last week, a move that could potentially drag the country back into civil war. Libya has been gripped by unrest since the 2011 uprising that overthrew and killed longtime dictator Moammar Gadhafi. In recent years, the country has been governed by rival authorities in the east and in Tripoli, in the west, each backed by various armed groups.
Fayez Sarraj, head of government in Tripoli, accused Hifter of "betraying" him.
"We have extended our hands towards peace, but after the aggression that has taken place on the part of forces belonging to Hifter and his declaration of war against our cities and our capital ... he will find nothing but strength and firmness," al-Sarraj said Saturday in televised comments.
Hifter is seeking to capture the capital and seize military control of the whole country before U.N.-sponsored talks due to start next week that were designed to set a time frame for possible elections in the oil-rich country.
The U.N. envoy for Libya, Ghassan Salame, said the U.N. is determined to hold the planned conference.
U.S. Secretary of State Mike Pompeo urged Libyan factions to return to negotiations, saying that "there is no military solution to the Libya conflict."
"We have made clear that we oppose the military offensive by Khalifa Haftar's forces and urge the immediate halt to these military operations against the Libyan capital," Pompeo said in a statement.
Fighting was underway Sunday at the international airport, some 24 kilometers (15 miles) from central Tripoli, after Hifter claimed to have seized the area. The airport was destroyed in a previous bout of militia fighting in 2014. Hifter said his forces had launched airstrikes targeting rival militias on the outskirts of Tripoli.
The rival militias, which are affiliated with a U.N.-backed government in Tripoli, said they had also carried out airstrikes, slowing Hifter's advance.
Armed groups behind the U.N.-backed government of national accord, or GNA, have announced an effort to defend Tripoli, vowing to recapture all areas seized by Hifter's forces.
Col. Mohamed Gnounou, a spokesman for GNA forces, said in televised comments Sunday that the counteroffensive, dubbed "Volcano of Anger," was aimed at "purging all Libyan cities of aggressor and illegitimate forces."
The two sides reported that at least 35 people, including civilians, had been killed since Thursday.
The Health Ministry of the Tripoli-based government said in a statement that at least 21 people, including a physician, were killed and at least 27 wounded. Ahmed al-Mesmari, a spokesman for Hifter's forces, said Saturday that 14 troops had been killed since the offensive began.
The fighting has displaced hundreds of people, the U.N. migration agency said. The U.N. mission to Libya called for a two-hour cease-fire on Sunday in parts of Tripoli to evacuate civilians and the wounded.
The LNA is supported by Egypt, the United Arab Emirates, France and Russia. It answers to the authorities based in eastern Libya, who are at odds with the U.N.-backed government.
Magdy reported from Cairo.