(CNN) The United States military pulled a contingent of its troops from Libya on Sunday amid a surge in violence in the capital city of Tripoli, America's top commander for Africa said.

"The security realities on the ground in Libya are growing increasingly complex and unpredictable," Marine Corps Gen. Thomas Waldhauser, head of US Africa Command, said Sunday in a statement. "Even with an adjustment of the force, we will continue to remain agile in support of existing US strategy."

The American forces, who provide military support for diplomatic missions, counterterrorism activities and improving regional security, have been relocated temporarily in response to "increased unrest."

Col. Chris Karns, spokesman for Africa Command, reiterated that the movement of troops would not impact the force's ability to respond to threats and targets.

"For security reasons, I won't pinpoint where these forces will flow," said Karns. "It is important (that) groups, such as ISIS, don't have an exact map of our whereabouts, but instead we use our finite resources on the continent to adjust swiftly, efficiently, and employ with maximum effect."

Read More