A small contingent of U.S. forces that have operated out of Libya in support of operations against the Islamic State and al-Qaeda were evacuated on Sunday as the Libyan National Army (LNA) advanced toward the nation’s capital of Tripoli while engaging a number of rival militia groups tied to the nation’s recognized government.

“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.”

Libya has been governed by rival forces jockeying for power since the 2011 uprising, during which the nation’s long-time dictator, Muammar Gaddafi, was killed. There are now dozens of militias staking claims to different regions of the country, most of which have recently begun aligning themselves with either the U.N.-backed Government of National Accord (GNA), which is based out of the nation’s capital in Tripoli, or with the Libyan National Army (LNA), which is backed by Egypt and the United Arab Emirates. The LNA, while lacking control of the nation’s formal capital, maintains an extremely strong presence in the nation’s eastern regions.

Prime Minister Fayez al-Serraj of the U.N.-backed GNA has accused the LNA, led by General Khalifa Haftar, of attempting a coup with their attack on Tripoli, and has vowed that the rebel troops will be met with force.