With tens of thousands of protesters marching in the streets of Baghdad to demand changes in government, Iraq’s Shiite prime minister, Haider al-Abadi, appeared before Parliament this week hoping to speed the process by introducing a slate of new ministers. He was greeted by lawmakers who tossed water bottles at him, banged on tables and chanted for his ouster.

“This session is illegal!” one of them shouted.

Leaving his squabbling opponents behind, Mr. Abadi moved to another meeting room, where supportive lawmakers declared a quorum and approved several new ministers — technocrats, not party apparatchiks — as a step to end sectarian politics and the corruption and patronage that support it.

But, like so much else in the Iraqi government, the effort fell short, with only a handful of new ministers installed and several major ministries, including oil, foreign and finance, remaining in limbo. A new session of Parliament on Thursday was canceled.

Almost two years after the Islamic State swept through northern Iraq, forcing the Obama administration to re-engage in a conflict it had celebrated as complete, Iraq’s political system is barely functioning, as the chaotic scenes in Parliament this week demonstrated.