Updated

The State Department Tuesday urged all U.S. citizens to immediately leave Libya due to security concerns.

The evacuation warning came shortly after the USS Bataan, with about 1,000 Marines aboard, sailed into the Mediterranean Sea to assist Americans in leaving if necessary, according to U.S. military officials. The officials made clear the ship has received no formal orders to conduct new missions.

Officials said the Navy amphibious assault ship sailed from the Arabian Sea and was already scheduled to go to the Mediterranean to participate in a multi-county military exercise in the region.

The State Department issued a statement Tuesday night saying,"The Department of State warns U.S. citizens against all travel to Libya and recommends that U.S. citizens currently in Libya depart immediately. The security situation in Libya remains unpredictable and unstable. The Libyan government has not been able to adequately build its military and police forces and improve security following the 2011 revolution."

The unrest has caused the State Department to limit staffing at the U.S. Embassy in Tripoli, and it is "only able to offer very limited emergency services to U.S. citizens in Libya," according to the release.

The statement added that "various groups" have called for attacks against U.S. citizens and U.S. interests in Libya, and said military-grade weapons remain in the hands of private individuals, including those that are capable of attacking civilian aircraft.

The warning was issued in light of fighting taking place earlier this month in the capital of Tripoli, where renegade Libyan Gen. Khalifa Hifter is waging an offensive against Islamists.

Hifter began his so-called "Dignity Operation" more than 10 days ago to crush Islamist militias and their political backers.

Hifter has the support of politicians, diplomats, army units and tribes that want him to impose order and rein in the country's unruly militias, three years after they toppled and killed longtime dictator Muammar al-Qaddafi.

However, the Al Qaeda-inspired group Ansar al-Shariah has now vowed to fight Hifter, whom it accuses of being an "American agent."

Ansar al-Shariah is believed to have played a role in the deadly Sept. 11, 2012, attack on the U.S. consulate in Benghazi, Libya, in which U.S. Ambassador Chris Stevens and three other Americans were killed.

The Associated Press contributed to this report.