Security at the U.S. embassy in Baghdad was bolstered and some staff members were being moved out of Iraq’s capital city as it was threatened by the advance of by an al-Qaida inspired insurgency, a State Department spokeswoman said Sunday.

State Department spokeswoman Jen Psaki said in a statement that much of the U.S. embassy staff will stay in place even as parts of the country experience instability and violence. She did not specify the number of personnel affected by the shift. The embassy is within Baghdad’s Green Zone. It has about 5,000 personnel, making it the largest U.S. diplomatic post in the world.

“Overall, a substantial majority of the U.S. Embassy presence in Iraq will remain in place and the embassy will be fully equipped to carry out its national security mission,” she said.

Some embassy staff members have been temporarily moved elsewhere to more stable places at consulates in Basra in the Shiite-dominated south of Iraq and Irbil in the Kurdish semi-autonomous region in north-eastern Iraq and to Jordan, she said.

U.S. travellers in the country were encouraged to exercise caution and limit travel to certain parts of Iraq.

The State Department issued a travel warning for Iraq Sunday night that cautioned U.S. citizens to avoid “all but essential travel to Iraq. Travel within Iraq remains dangerous given the security situation.”

“Due to the relocation of personnel from Baghdad, the embassy will only be restricted in its ability to offer all consular services; but emergency services are always available to U.S. citizens in need at any embassy or consulate anywhere in the world,” Psaki said.

Pentagon spokesman Rear Adm. John Kirby said in a statement that a “small number” of military personnel are helping to keep State Department facilities safe in Baghdad. He said embassy personnel are being moved by commercial, charter and State Department aircraft. But, Kirby says, the U.S. military has “airlift assets at the ready” should the State Department request them. A military official said about 150 Marines have been sent to aid with security and are already at the embassy.

Islamic militants of the Islamic State of Iraq and the Levant, or ISIL, have captured large swaths of territory north of Baghdad. Their advance on the Iraqi capital was prompting tighter security in the city of 7 million people.

The State Department acted as the Iraqi government sought to bolster its defenses in Baghdad on Sunday. Despite the added security, a string of explosions killed at least 15 people and wounded more than 30 in the city, police and hospital officials said. And, an Islamic militant group behind the strife posted graphic photos that appeared to show its fighters massacring dozens of captured Iraqi soldiers.

U.S. State Department spokesman Jen Psaki said the ISIL militants’ claim of killing the Iraqi troops “is horrifying and a true depiction of the bloodlust that those terrorists represent.”

She added that an ISIL claim that 1,700 Iraqi troops were killed in Tikrit could not be confirmed by the U.S. Tikrit is the hometown of ousted Iraqi leader Saddam Hussein.

White House spokesman Josh Earnest said Obama on Sunday was briefed on the situation by National Security Adviser Susan Rice as he was spending Father’s Day in Rancho Mirage, California, where he was taking a brief vacation.

Secretary of State John Kerry made calls to foreign ministers in Jordan, the United Arab Emirates, Saudi Arabia and Qatar to discuss the threat and the need for Iraqi leaders to work together.

Earlier Sunday, Republican Sen. Lindsey Graham said that Iraqi Prime Minister Nouri al—Maliki cannot keep his country together, and a U.S. alliance with Iran might be needed to do so.

Graham, a member of the Senate Armed Services Committee, said a U.S. partnership with longtime foe Iran makes him uncomfortable but likened it to the United States working with Soviet leader Josef Stalin in World War II against Adolf Hitler. He says the United States has to do what it can to keep Baghdad from falling to insurgents.

Iran says it has no interest in a destabilized Iraq as its neighbor.

Defense Secretary Chuck Hagel has ordered the USS George H.W. Bush aircraft carrier to move from the northern Arabian Sea and it has arrived in the Persian Gulf as President Barack Obama considers possible military options for Iraq although he has ruled out the possibility of putting American troops on the ground in Iraq. Kirby has said the move will give Obama additional flexibility if military action were required to protect American citizens and interests in Iraq.

The carrier was accompanied by the guided-missile cruiser USS Philippine Sea and the guided—missile destroyer USS Truxtun, which carry Tomahawk missiles that could reach Iraq.

In a phone call Saturday with Iraqi Foreign Minister Hoshyar Zebari, Kerry said U.S. assistance “would only be successful if Iraqi leaders were willing to put aside differences and implement a coordinated and effective approach to forge the national unity necessary to move the country forward and confront the threat of ISIL,” according to a statement by the State Department.

Graham spoke to CNN’s “State of the Union” and CBS’ “Face the Nation.”

More In: International | News | World