A state of high alert has been declared in the Iraqi capital Baghdad after protesters broke into the fortified Green Zone and stormed the parliament building, shortly after politicians again failed to approve new ministers.

Saturday's development was the climax of weeks of political turmoil in Iraq that has seen MPs hold a sit-in, clash in the parliament chamber and seek to dismiss the speaker, halting efforts by Haider al-Abadi, the prime minister, to replace party-affiliated ministers with technocrats.

The unrest also coincided with a blast that targeted Shia pilgrims near Baghdad, killing at least 23 people.

The Green Zone is the most secure part of the Iraqi capital, housing the parliament, the prime minister's office and embassies.

"You are not staying here! This is your last day in the Green Zone," shouted one protester as thousands broke into the central Baghdad area.

Protesters, many of them supporters of Shia cleric Muqtada al-Sadr, attached cables to the tops of heavy concrete blast walls that surround the Green Zone, pulling them down to create an opening, television footage showed.

They then headed to parliament, where some protesters ran around the building and broke into offices, while others shouted "peacefully, peacefully" and tried to contain the destruction, an AFP news agency reporter at the scene said.

Security forces were present but did not try to prevent the demonstrators from entering the parliament building, the reporter said.

Protesters pulled barbed wire across a road leading to one of the exits of the Green Zone, effectively preventing some scared politicians from fleeing the chaos.

Protesters attacked and damaged several vehicles they believed belonged to parliamentarians, sources told Al Jazeera.

Ministerial nominees

Parliament failed to reach a quorum on Saturday after approving some of Abadi's ministerial nominees earlier in the week.

The Green Zone unrest kicked off minutes after Sadr, the powerful Shia leader, ended a news conference in the holy city of Najaf during which he condemned the political deadlock.

Last month he had threatened that his supporters would storm the Green Zone, but he did not order them to enter the area in his Saturday address.

The politicians "refused to end corruption and refused to end quotas", Sadr said, adding that he and his supporters would not participate in "any political process in which there are any type ... of political party quotas".

Key government posts have for years been distributed based on political and sectarian quotas.

Abadi's move to change the system has been opposed by powerful political parties that rely on control of ministries for patronage and funds.

Baghdad bombing

Both the United States and the United Nations have warned that the political crisis could distract from the fight against the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group.

Iraqi government forces backed by US-led military assistance have regained significant ground from ISIL, which overran large expanses of the country in 2014.

But the group still controls a large part of western Iraq, and are able to carry out frequent attacks against both civilians and security forces in government-held areas, including Baghdad.

Saturday's car bombing, which occurred in the city's Nahrawan area, killed at least 23 people and wounded up to 38 others, security and medical officials said.

ISIL, which considers the Shia to be heretics, claimed the attack and said it was carried out by a suicide bomber who detonated a vehicle laden with three tonnes of explosives.

The officials said the explosion struck a road used by Shia pilgrims who were walking to the shrine of Imam Musa Kadhim in northern Baghdad for annual commemorations.

Kadhim, the seventh of 12 imams revered in Shia Islam, died in 799 AD.

The pilgrimage has in recent years turned into a huge event that brings Baghdad to a standstill for days.