In Al Umma Park in central Baghdad – the “park of the nation” – a small group of men and two women debated under ageing eucalyptus trees how best to articulate the demands of the protesters who have taken to the streets of Iraqi cities in their thousands this month.

“Burning army trucks won’t help us, it will only help the government accuse us of being hooligans,” said a young man. “If I give you 17 RPG [rocket-propelled grenade] launchers and you burn that building, how will that benefit our demands?” Another man called for the government to be toppled. As the group gathered around him listening, someone shouted: “Who made you a speaker?” This spurred the rest of the crowd to break into chants of “no one represents us” and “Iran out, out”, denouncing Iraq’s ruling Islamic parties and their Iranian backers.

The nature of the debate, just like the demonstrations taking place outside the park, was chaotic, boisterous and leaderless. Most of the group were in their 20s, but among them stood two old communists in Che Guevara berets.

Eventually, the crowd agreed on a list of demands, which were read out from the steps of the city’s Freedom monument by a young bearded and bespectacled man: “The resignation of the government, new elections, a change in the elections law and most importantly putting all the government officials on trial.” The crowd cheered, mobile phones were raised and the call was raised to demonstrate in Tahrir Square.

‘Those who don’t want to advance go back home’

Iraq’s latest spasm of protest erupted on 1 October after a call for demonstrations on Facebook. Sparked by the dismissal of a popular general who distinguished himself in the war against Islamic State, the demonstrations have been motivated by a deeper undercurrent of anger towards a corrupt religious oligarchy, a rotten bureaucratic regime and the failure of the Iraqi prime minister, Adil Abdul-Mahdi, to fulfil any of his campaign pledges after a year in power.

For a young generation that has grown up in the 16 years that have followed the toppling of Saddam Hussein, elections and representative democracy have become synonymous with corruption and MPs abusing their privileges. Religious parties, many backed by Iran, dominate the political sphere and though oil-rich Iraq has an income of hundreds of billions of dollars, the reality for many citizens is parallel with life in some of the poorest Arab nations: unemployment, a collapsing healthcare system and lack of services.

Facebook Twitter Pinterest Three young anti-government protesters in Baghdad. Photograph: Ghaith Abdul-Ahad/The Guardian

As the protests gathered pace on 5 October, Baghdad was on the edge.Under a flyover less than a mile from Tahrir Square a teenager wearing a yellow T-shirt, shorts and flip-flops walked slowly while a police officer brandishing his Kalashnikov rifle chased him away. Thin black columns of smoke twisted into the sky and a crowd – of fellow teenagers and young men – started marching towards the square.

Police standing guard shot in the air but the crowd moved on, waving Iraqi flags and Shia banners.

Tyres were set on fire as the crackle of gunfire became continuous and the sound of teargas canisters being fired became more frequent, white gas mixing with the black fumes from the burning rubber. Back and forth the young men surged, only to be pushed back by the heavy machine-gun fire and teargas.

Amid the carnage, dozens of small three-wheeled tuk-tuk motorcycle rickshaws zoomed between the crowd, ferrying the injured away from the scene. A yellow one carried a man slumped in the back, unable to breathe.

Urging the men to move forward was a short thin young man with a well trimmed ginger beard. “Why are you standing behind?” He called on the men cowering behind the bridge railing. “Those who don’t want to advance go back home.”

Play Video 1:56 Demonstrators killed in Iraqi holy city as protests gain momentum – video

The man, who gave his name as Jawdat, said he was a former fighter with the Hashd al-Shaabi paramilitary group, which was established in 2014 from disparate armed groups and volunteers to fight against Isis. Hashd al-Shaabi has received training and other support from Iran. Jawdat said his brother was an officer who was killed in the war against Isis.

“I fought with the Hashd, I even went to fight in Syria, but what did I get from this government? Nothing, while those politicians in the Green Zone [in Baghdad] are blocking any attempt to reform the state.”

Ambulances darted back and forth ferrying the injured and the dead – 20 people were killed at that demonstration alone on 5 October.

During six days of demonstrations, Abdul-Mahdi appeared on TV every night, promising in a soft voice to create jobs, provide cheap housing and eradicate corruption.

Yet young unarmed men were killed as they sought refuge behind concrete barriers or stood in the streets waving flags. In at least one instance snipers positioned on buildings participated in the killings.

Activists and journalists were intimidated, and dozens of them fled Baghdad after receiving threatening phone calls. Media outlets and TV networks were closed. Plainclothes officers roamed hospital wards, detaining injured demonstrators. “The doctors just patched my injury and told me to leave quickly, after officers entered the hospital looking for demonstrators,” said a young man as he lay in his bed, his injury still bleeding three days after he was shot in a street close to Tahrir Square.

By 7 October more than 106 people had been killed, and more than 6,000 injured.

‘Iran doesn’t want anything that threatens its position here’

The size of the demonstrations at the start of the month was not abnormal, but what came as a shock was the ferocity of the response.

Many Iraqi observers attributed the violence to the extent to which the regime has been shaken. Others suggested that it was indicative of concern among the country’s pro-Iran militias that the protest were really intended to undermine Tehran.

“Iran doesn’t want anything that threatens its position here and that’s why the reaction was so harsh,” said an intelligence officer at the interior ministry.

Many of Iraq’s political parties have ties to Iran and militias that originated there – a legacy of the aftermath of the 2003 war, when Tehran bolstered Iraq’s newly powerful Shia majority, previously repressed under Saddam’s Sunni Arab Ba’athists.

Fatah, the political arm of Hashd al-Shaabi, is Abdul-Mahdi’s remaining major sponsor, after a bloc tied to the firebrand cleric Moqtada al-Sadr said it was dropping its support over the weekend.

Militiamen have been integrated into the security services and have played a central role in the crackdown on the demonstrations. The militias have become a focus of the demonstrators’ anger, a flashpoint for Iran’s perceived control over the Iraqi state.

During one night of protests, a clean-shaven, tall unarmed army officer stood in front of crowd of young men, pleading with them to disperse. “I can let you go down and march towards Tahrir Square,” he said pointing at the rising columns of smoke. “But I swear by Allah that the militiamen and the snipers will kill you.” The crowds responded with angry anti-Iranian chants.

‘Our soul, our blood, we sacrifice for you Iraq’

Facebook Twitter Pinterest Thousands protest over corruption, lack of jobs and poor services in Tahrir Square, Baghdad, on Monday. Photograph: Thaier Al-Sudani/Reuters

Last Friday, a second wave of demonstrations began. The crowds waved Iraqi flags and chanted “our soul, our blood we sacrifice for you Iraq”. At least 74 people were killed over two days, with hundreds more wounded. The overall toll since the start of the month now stands at more than 250.

On Sunday, Iraq’s elite counter-terrorism service said it had been deployed in Baghdad to protect important state buildings “from undisciplined elements”.

Protesters who stayed in Tahrir Square, the epicentre of the demonstrations, over the weekend were joined by thousands of students on Monday who skipped classes at universities and secondary schools. Security forces fired teargas and stun grenades to keep protesters from crossing a main bridge leading to the Green Zone, home to government offices and embassies. The army announced it would impose an overnight curfew in the capital.

Young protesters also gathered on Monday in the southern cities of Nasiriyah, Hillah and Basra. Even in the holy city of Najaf, dozens of young trainee clerics took to the streets. In Kut, most government offices were shut for lack of staff. Overnight into Tuesday masked gunman opened fire on protesters in the Shia holy city of Karbala, killing 18 and wounding hundreds, in one of the deadliest single attacks yet.

On the eve of the second wave of protests, an exhausted young intelligence officer sat in a small Japanese saloon car not far from the Green Zone. Since the start of the demonstrations he has been a member of the interior ministry’s operation room.

“We have issued strict orders to our men not to carry weapons and to stand unarmed among the civilians because we don’t want to be accused of killing demonstrators,” he said.

“The people who shot at demonstrators [in early October] were members of the [powerful, Iran-backed] Khorasani and Badr militias. The commanders of these militias have been in control since the start.

“Late in September before the start of the demonstrations, we received a secret and urgent [telegram] informing us of the presence of small units of Iranian Revolutionary Guards that had established their positions insidethe Green Zone. [Powerful Iraqi politician] Hadi al-Amiri, and the head of the Khorasani militia were with them.”

The officer said that from 1 October onwards Iranian and Iraqi militia commanders led the operation room from where the response to the demonstrations has been orchestrated.

“These militia became the tool to oppress the demonstrations and they still are, this has become open, and done in daylight,” he said.

Facebook Twitter Pinterest Protesters take to the streets of Hilla, a city in central Iraq, on 28 October. Photograph: -/AFP via Getty Images

Obsessed with the idea of a coup in a country were revolutions, wars and upheavals are a recurring event, the government, the religious parties and their Iranian-backed militias have denounced the demonstrators as plotters and former Ba’athists. The protests, so the line goes, have been organised by the US embassy and Gulf states set on toppling Iraq’s Shia government.

“Look at the people around you,” said a 23-year-old lawyer in Sadr city, a suburb of Baghdad, one night in early October, pointing at dozens of children crouching in a small alleyway as bullets whistled over his head. “Do you think the American embassy even knows that this alleyway exists? We are all unemployed, I finished a law school three years ago and I haven’t found a job yet.”

A young man was carried back from the frontline, his leg soaked in blood. A pyre of burning tyres shot orange flames.

“These are the best demonstrations since 2003,” the lawyer said. “All the previous demonstrations were either organised by Moqtada al-Sadr or the secularists, but this is a genuine leaderless people’s uprising.”