The United States suspended operations at its embassy in Libya Saturday and evacuated its diplomats to neighboring Tunisia under U.S. military escort amid a significant deterioration in security in Tripoli as fighting intensified between rival militias, the State Department said.

"Due to the ongoing violence resulting from clashes between Libyan militias in the immediate vicinity of the U.S. Embassy in Tripoli, we have temporarily relocated all of our personnel out of Libya," spokeswoman Marie Harf said.

The withdrawal underscored the Obama administration's concern about the heightened risk to American diplomats abroad, particularly in Libya where memories of the deadly 2012 attack on the U.S. mission in the eastern city of Benghazi are still vivid and the political uproar over it remain fresh ahead of a new congressional investigation into the incident. A senior military official told Fox News the Pentagon has been advising the State Department leave the post for weeks.

"Securing our facilities and ensuring the safety of our personnel are top department priorities, and we did not make this decision lightly," Harf said. "Security has to come first. Regrettably, we had to take this step because the location of our embassy is in very close proximity to intense fighting and ongoing violence between armed Libyan factions."

American personnel at the Tripoli embassy, which had already been operating with limited staffing, left the capital around dawn and traveled by road to neighboring Tunisia, according to Harf. Roughly 70 embassy staffers were driven out of the city in a caravan by 80 Marines, Fox News has learned.

"At the request of the Department of State, the U.S. military assisted in the relocation of personnel from the U.S. Embassy in Tripoli," a spokesman from the U.S. Department of Defense said.

"During movement, F-16's, ISR assets and an Airborne Response Force with MV-22 Ospreys provided security," the statement said. The evacuation was not announced in advance in order to ensure the staffers safe departure.

The department said embassy operations will be suspended until a determination is made that the security situation has improved. Tripoli has been embroiled for weeks in inter-militia violence that has killed and wounded dozens on all sides.

The fighting has been particularly intense at the city's airport where militias are fighting for control. Residents near the airport have been forced to evacuate their homes after they were hit by shells. On Friday, the official Libyan news agency LANA reported that explosions were heard early in the day near the airport area and continued into the afternoon.

The U.S. evacuation follows Turkey, which on Friday announced that it had closed down its embassy, as the United Nations, aid groups and foreign envoys also chose to leave the region.

"We are committed to supporting the Libyan people during this challenging time, and are currently exploring options for a permanent return to Tripoli as soon as the security situation on the ground improves. In the interim, staff will operate from Washington and other posts in the region," Harf said. The evacuated staffers will continue to work on Libya issues in Tunis, elsewhere in North Africa and Washington.

The State Department also issued a travel warning for Libya urging Americans not to go to the country and recommending that those already there leave immediately. "The Libyan government has not been able to adequately build its military and police forces and improve security," it said. "Many military-grade weapons remain in the hands of private individuals, including antiaircraft weapons that may be used against civilian aviation."

This is the second time in a little more than three years that Washington has closed its embassy in Libya. In Feb. 2011, the embassy suspended operations amid the uprising that eventually toppled longtime leader Muammar Qaddafi. After the formation of a transitional government in July, 2011, the embassy reopened in September. Qaddafi was killed in October of 2011.

The Obama administration has been particularly sensitive about security of U.S. government employees in Libya since the Sept. 11, 2012, terror attack on the U.S. mission in the country's second largest city of Benghazi that killed ambassador Chris Stevens and three other Americans. The administration is still fending off criticism from Republicans and others that it did not either enhance security in Benghazi or evacuate the mission due to rising violence in that city in the months prior to the attack.

The Benghazi mission was abandoned after that attack and never reopened. The embassy in Tripoli has been operating with reduced staff since but has remained open even as the violence intensified.

On Friday, U.S. Ambassador to Libya Deborah Jones appealed for fighting near the embassy to stop. "We have not been attacked but our neighborhood a bit 2 close to the action," she tweeted. "Diplomatic missions 2 B avoided pls." On Sunday, Jones tweeted about "heavy shelling and other exchanges" of fire in the vicinity of the embassy and speculation about the potential evacuation had been rife at the State Department for more than a week.

The battle in Tripoli began earlier this month when Islamist-led militias -- mostly from the western city of Misrata -- launched a surprise assault on the airport, under control of rival militias from the western mountain town of Zintan. On Monday, a $113 million Airbus A330 passenger jet for Libya's state-owned Afriqiyah Airways was destroyed in the fighting.

The rival militias, made up largely of former anti-Qaddafi rebels, have forced a week-long closure of gas stations and government offices. In recent days, armed men have attacked vehicles carrying money from the Central Bank to local banks, forcing their closure.

Libyan government officials and activists have increasingly been targeted in the violence. Gunmen kidnapped two lawmakers in the western suburbs of Tripoli a week ago.

Fox News' Justin Fishel and The Associated Press contributed to this report.