The Sunni uprising, having now turned violent, represents a significant challenge to Prime Minister Nuri Kamal al-Maliki, whose consolidation of power over the security forces and the judiciary, and his targeting of high-level Sunni leaders for arrest, has raised alarms among world powers. Mr. Maliki has presided over an unwieldy power-sharing government, which nominally gives prominent roles to Sunnis but in reality has resulted in political stasis, and he has signaled in recent months that he would prefer to move to a majority government, dominated almost solely by Shiites. On Tuesday, two Sunni ministers quit to protest the raid in Hawija, and the largest bloc of Sunni lawmakers suspended participation in Parliament.

Mr. Maliki made no public comments on the situation Wednesday, but on Tuesday, after being pressed by American officials and the United Nations, he said he would open an investigation into the events in Hawija, and promised to hold military officers accountable for any mistakes.

The deteriorating situation in Iraq highlights the sectarian tensions that have risen across the region, particularly amid the raging civil war in Syria. There, a largely Sunni rebellion is seeking to topple the government of President Bashar al-Assad, which is dominated by Alawites, who belong to a branch of Shiite Islam. In Iraq, the central government has aligned with the Syrian government and its greatest ally, Iran, while Sunnis here have sided with the rebels, and they now appear to be emboldened by the events in Syria to challenge their own government.

The sectarian fissure is evident in the rhetoric of the Sunni rebellion here: militants over the last few days have referred to Iraq’s army as a force loyal to Iran, while many Shiites here have cast the formerly peaceful Sunni protesters as Muslim extremists beholden to Al Qaeda.

In other areas of the country, militants, their faces covered in checkered kaffiyehs, attacked army positions. In Tuz Khormato, also near Kirkuk, militants ambushed an army convoy, killing four soldiers and setting fire to vehicles. In Baji, north of Tikrit, gunmen also attacked a convoy, resulting in a gunfight that left five militants and one soldier dead, according to a security official in Tikrit.