Updated

The U.S. military has alerted two elite military units in Europe to be on standby if needed to respond to a deteriorating security situation in Tripoli, Fox News has learned.

In recent days both the U.S. embassy and British embassy in Libya have removed non-essential staff from their embassies.

A specialized Marine unit based in Moron, Spain, is in the process of being repositioned closer to Libya; and in Stuttgart, Germany, a special operations force assigned to AFRICOM has been placed on heightened alert.

Neither team has moved yet.

"We are repositioning assets in the region that could respond if necessary," a senior military official told Fox News Friday. "If the situation deteriorates (in Tripoli) we would be positioned to respond."

The positioning comes after a series of disturbing security developments. Protests broke out Sunday in the capital. The U.S., Britain and France -- the coalition that overthrew Muammar Qaddafi -- issued a joint warning Wednesday to the militias to observe the rule of law, amid concerns about rising tensions between armed rival factions. In Benghazi, there were two explosions at police stations.

The State Department issued a warning Thursday saying the security situation in Tripoli "deteriorated when armed groups seized Libyan government buildings in a dispute over a law regarding officials of the former regime."

The department said it ordered "a number of U.S. government personnel" to depart in response.

The British issued the following warning: "Given the security implications of the ongoing political uncertainty, the British Embassy is temporarily withdrawing a small number of staff, mainly those who work in support of Government Ministries which have been affected by recent developments."