Iraqi Prime Minister Mustafa Al Kadhimi has threatened to "vacate his post" if the complicated political standoff in the country is not resolved.
His remarks were in response to violence in Baghdad's heavily fortified Green Zone that left at least 30 people dead and wounded hundreds more.
"I caution and warn against those who continue to sow the seeds of chaos, conflict and infighting, and who refuse to listen to the voice of reason," Mr Al Kadhimi said on Tuesday.
"Should they continue in this path, I will take the moral and patriotic decision to vacate my position according to Article 81 of the Constitution and hold them accountable to the Iraqi people and the history books.
"I have never been a party to or part of the problem. I was patient with all kinds of abuse, obstruction and the declared war from all sides to weaken the state of Iraq."
Mr Al Kadhimi said a committee had been formed "to find those responsible for putting arms in the hands of those who opened fire and shot at the demonstrators, and shed blood".
He stressed that "clear and strict orders" prohibiting the use of live ammunition had been issued.
Earlier on Tuesday, Iraqi President Barham Salih said early elections could help to ease the political tension.
"Holding new, early elections in accordance with a national consensus represents an exit from the stifling crisis," Mr Salih said in a televised speech.
"The recent elections have not achieved what Iraqi citizens were hoping for, and have faced a lot of challenges and problems."
Mr Salih praised influential Shiite cleric Moqtada Al Sadr's efforts to end the violence.
“The stance of Sayyed Moqtada Al Sadr was responsible and brave,” he said.
“The end of violence and clashes was essential to prevent the shedding of Iraqi blood, but it does not mean that the political crisis has come to an end."
The Iraqi president called on all political powers to put aside their differences in the interest of the country.
Mr Salih, whose role is largely ceremonial, said the current situation would lead only to further corruption.
“We have to admit that the political system and constitutional institutions have failed to avoid what happened, and we are in need of serious reforms to address weakness points,” Mr Salih said.
“There is a need to carry out constitutional amendments, which should kick off in the coming period.”
The Shiite cleric was the main winner in the elections held last October but has failed to form a government with Sunni Arab and Kurdish parties.
Iran-backed Shiite groups, which make up a rival coalition called the Co-ordination Framework, have mounted legal challenges against the process to form a new government and staged boycotts.
Their actions, which Mr Al Sadr has likened to a coup, resulted in an escalation of tension in Iraq.
Violence erupted after Mr Al Sadr said he was withdrawing from all political activity — a decision he said was prompted by the failure of other Shiite leaders and parties to reform a corrupt and decaying governing system.