BAGHDAD — The Sunni extremist militants threatening Iraq seized another northern city on Monday in a battle with the Iraqi Army after having ambushed a convoy of untrained Shiite volunteers in the first lethal encounter between Sunni and Shiite combatants since the government began mobilizing thousands of Shiites.

The insurgents, an alliance of the Islamic State in Iraq and Syria and the vestiges of loyalists to the Saddam Hussein government that was ousted by the Americans a decade ago, took over the city of Tal Afar, according to Iraqi security officials and residents, sending both Shiite and Sunni residents fleeing.

In an additional sign of diminished confidence in the government of Prime Minister Nuri Kamal al-Maliki, President Obama said on Monday that he had ordered up to 275 members of the United States armed forces into Iraq to guard the American Embassy in Baghdad, a day after the State Department announced a partial evacuation of the heavily fortified facility.

“This force is deploying for the purpose of protecting U.S. citizens and property, and is equipped for combat,” Mr. Obama said in a letter to congressional leaders that was released by the White House. “This force will remain in Iraq until the security situation becomes such that it is no longer needed.”