More than a dozen people have been stabbed in a Baghdad square that has become a focal point for anti-government and anti-Iran protests after supporters of an Iranian-backed militia flooded the area.

Thousands of men waving sticks, Iraqi flags and the insignia of the Hashd al-Shaabi armed group descended on Tahrir Square on Thursday morning in apparently coordinated marches from across the capital.

Anti-government protesters who have been occupying the square for several weeks, some of whom are critical of Iranian influence in the country, said at least 15 people were stabbed before the militia-linked marchers withdrew by the late afternoon.

It was unclear whether the attacks were carried out by Hashd al-Shaabi supporters or, as some protesters speculated, by people working on behalf of the state or another entity trying to sow discord within the anti-government forces.

Many units of Hashd al-Shaabi, a Shia-majority militia, have been trained or equipped by Iran, and before the stabbings its supporters had been mixing uneasily with the protesters.

Their presence was seen as a challenge to the anti-Iran elements in the protest movement. “They’ve ruined it,” one anti-government protester said of the militia-linked arrivals in the square. Another said: “It’s going to get messy.”

The anti-government protests began two months ago and forced the resignation of the country’s prime minister, Adel Abdul Mahdi, last week.

More than 400 people have been killed and around 20,000 wounded, the vast majority by security forces, despite calls by the UN and Iraq’s senior religious authorities for the government to show restraint.

Ali al-Bayati, a representative of Iraq’s Independent High Commission for Human Rights, said this week that at least 460 protesters were killed in October and November.

Lawmakers in Baghdad approved Mahdi’s resignation this week but the move appears unlikely to stop the unrest. Protesters have said their aim is the dismissal of the entire political system established after the 2003 US-led invasion, which they say has entrenched sectarianism and corruption and failed to improve living standards despite Iraq’s oil wealth.

Iran’s influence on the Iraqi establishment has been a prominent target, and the Iranian consulate in the Shia holy city of Najaf was torched by protesters twice last week.

Since 1980 Iraq has been devastated by conflicts with neighbouring Iran, crippling sanctions, civil wars and a US-led invasion that killed hundreds of thousands of people and left citizens worse off, by some measures, than under the authoritarian rule of Saddam Hussein.

The end of the war against Islamic State and the election of Mahdi, 77, last year were framed as the beginning of a new chapter, but instead they have brought into focus the deep anger felt by many Iraqis, especially young people from the Shia majority, about endemic corruption and poor living conditions.

Protests have regularly broken out in recent years but this latest wave has proved more sustained and become the largest grassroots movement in Iraqi history, drawing in unemployed people, students, civil society activists and members of powerful tribes.

It has been fuelled by the state’s disproportionate response to the early demonstrations: at least 149 people were killed in the first week of unrest and the government has admitted using “excessive force”.

Demonstrators are rallying against a political system, called muhasasa, that divides the spoils of government among sectarian elites in a system intended to ensure every ethnic and religious community is provided for.

The popular appeal of those leaders has declined, according to analysts, just as the perception has grown that they are benefiting at the expense of ordinary citizens without connections among the elites.

Agence France-Presse and Associated Press contributed to this report