KARBALA, Iraq - Wearing elegant gold-fringed robes and traditional Arab head-dresses, three Sunni tribal leaders waited respectfully in an upstairs reception room inside the Imam Hussein shrine in Karbala one morning last week.

The shrine is one of Shia Islam’s holiest places and on this day, dozens of pilgrims sat cross-legged reading sacred poems in the courtyard below or knelt in prayer in the Shia way with their foreheads touching a round clay tablet on the carpet in front of them.

When the shrine’s senior cleric, Sheikh Abdul Mahdi al-Karbalai, entered the ornately furnished reception room to welcome his unexpected Sunni guests, their mission rapidly became clear. There was barely time for the four men to exchange greetings with the requisite number of alhamdulillah - praise be to God - before the leader of the Sunni trio came to the point. The Islamic State group had killed around 200 civilians from his tribe, the al-Khazraji, Sheikh Qais Jassem al-Khazraji said. He and his colleagues now wanted to offer 150 armed men to fight alongside the Shia paramilitaries who are battling IS.

The offer was accepted with alacrity. The Shia cleric told his guests the paramilitaries had lost 30 men in one day the previous week in battles north of Baiji. Another 90 men were wounded so new volunteers were definitely needed. The Khazraji leaders, whose people are centred in an area between Tikrit and Mosul, asked the Shia cleric to confirm the arrangement by signing a paper which they had brought with them. Karbalai did so without hesitation and the brief encounter ended.

Two years ago such a deal would have been unimaginable.

But IS’s eruption on to the scene in Iraq and Syria has produced several startling changes. One of the more remarkable is the creation of armed militias (Shia leaders discourage the word which they consider pejorative) by Iraq’s top religious leaders. Although some clerics who also head political parties long ago formed militias - for example the Badr brigade of the Hakim family or Moqtada al-Sadr’s Mahdi army - this practice was frowned on by the grand ayatollahs whom Shia communities largely follow. The ayatollahs felt that private militias heightened the risk of intercommunal violence and undermined Iraq’s national army.

Attitudes changed in June last year when IS seized Mosul after most of the Iraqi army fled. IS was already occupying Fallujah just west of Baghdad and after the Mosul debacle the Shia authorities worried that the militant group, which treats Shias as heretics, could capture Baghdad itself or move on the holy cities of Karbala and Najaf. No-one could forget that in Samarra in February 2006 IS’s predecessors, al-Qaeda in Iraq, had blown up the golden dome of the Askari shrine, which houses the remans of two of the Shias’ 12 imams.

Iraq’s top Shia authority, Grand Ayatollah Ali al-Sistani, issued a fatwa declaring that in the face of the danger from IS it was every able-bodied man’s duty to come to the defence of Iraq and volunteer to protect the shrines in the first instance. He pointedly did not urge the volunteers to join the Iraqi army but he also did not want to see more militias with party-political loyalties and agendas.

Rise of the hashd

Instead, the shrines’ leading officials created their own paramilitary forces which took food and supplies to people who had fled from IS and started giving volunteers military training. Tens of thousands answered Sistani’s call. The Imam Hussein shrine set up the Ali al-Akbar brigade, while the Abbas shrine which is also in Karbala set up a battalion as did the Imam Ali shrine in Najaf. Known officially as hashd al-shaabi, or Popular Mobilisation Units, the three are referred to sometimes as hashd Sistani.

Their exact numbers are not declared but the two battalions and one brigade are estimated to have about 50,000 men. Sheikh Maytham Rahi, the general supervisor of the Abbas battalion, told MEE his force consisted of 7,000 men, of whom 40 had been killed. This total of 50,000 in the hashd is considerably higher than the number of effective fighters in the Iraqi army, which is thought by some experts to be no more than 10,000, although authorities contest this saying there are far more fighters on the ground.

The main fighting forces however are deployed in the US-trained Golden Division and the Counter-Terrorism Bureau which are special forces who report directly to the Iraqi Prime Minister. Defeat by IS in Mosul last year and in Ramadi in May this year revealed how hollow the Iraqi army is, full of “ghost soldiers” whose presence inflates the numbers, allowing corrupt commanders and government officials to pocket the salaries of troops who only exist on paper.

As a result, the hashd have become one of the most successful “boots-on-the-ground” in Iraq, even though the 3,500 US advisers who have been sent back to Iraq by President Barack Obama are racing to train more units in the Iraqi army, with the US declining to train the hashd.

The militias’ first big victory came in October last year when they pushed IS out of the largely Sunni town of Jurf al-Sakhar. The town is close to the main road linking Baghdad with Karbala.

Some Sunni politicians have made much of the fact that although IS has been driven away, none of the residents of Jurf al-Sakhar have been allowed to come home. They charge the Shia with forced displacement of people or even sectarian cleansing. Maytham Rahi conceded that Jurf had no civilian residents now but said this was because of concern that the residents would invite IS to infiltrate back again.

"No civilians have returned to Jurf. Many collaborated with IS so they can’t go back. The roads are also full of booby-traps and bombs,” Rahi told MEE.

Until last year, Rahi’s military experience was confined to a short stint as a conscript in Saddam Hussein’s army performing peacetime duties. Now he takes part in all the battalion’s operations. He was wounded by an IS sniper in Balad last November, but he described himself as the battalion’s chief administrator. Under him, there are five former generals from Saddam’s army who take the military decisions.

Allegations of abuse

There have been credible allegations that some militia troops abused or killed Sunni civilians and destroyed houses after liberating Tikrit this summer. Officials in Karbala admit there have been cases of revenge killings but say the government needs to investigate fully. Sistani issued a 20-point list of advice for paramilitary fighters in February, saying that members of their opponents’ families and their property must not be touched.

Hashd leaders insist their aims are not sectarian. “We are not allowed to talk about Shia and Sunni. We are all Iraqis. Five percent of our battalion are Sunni, and people in Ramadi have asked us to liberate their areas,” said Rahi. “No part of Iraq can be liberated without the hashd.”

The hashd also has Christian units. In the military wards of the Imam Hussein hospital, I came across a wounded soldier who could not speak Arabic. He was from one of Iraq’s other minority communities. A Turkmen, he had joined hashd after fleeing with his family from Tal Afar in north-western Iraq after IS arrived.

In another hospital room I met Salim Kadhim, a 21-year-old who said he had moved from the Iraqi Army to the hashd because the army was badly managed. The hashd was better trained and had higher morale than the army, though it had lighter weapons. Volunteers usually got 45 days’ basic training, while snipers got six months. Army conscripts had only 30 days of training.

Sunnis join hashd against IS

There is strong communal pressure for young men to join the hashd. They are supposed to earn $625 a month, a relatively generous wage, but there is no time limit on their service. “They will fight until the battle against IS is over,” as Maytham Rahi of the Abbas battalion put it. Some of this summer’s refugees to Europe are known to be deserters from hashd, while other refugees have claimed that they have escaped the hashd's heavy-handed recruiting tactics.

The hashd is currently fighting north of Baiji in the Makhoul mountains, not far from where the Kurdish peshmerga has also been confronting IS.

Qassem Musleh, who served as top commander of the Ali Akbar brigade until two weeks ago, was also eager to highlight the role of Sunnis, saying they comprised about a sixth of the men (16 percent) in his brigade. He stressed that the hashd operated closely with the Iraqi army and the strategic missions for both forces were decided by the office of Prime Minister, Haider al-Abadi.

The liberation of Jurf al-Sakhar had been done jointly by the hashd and the army, he said. The hashd were the spearhead which liberated places so that the army could protect and patrol them once IS were driven out.

I asked Musleh about Abadi’s plan, which is strongly backed by the US, to create local forces in each province on the pattern of the US National Guard. The aim is to create Sunni militias which could defend their own areas from IS or take the lead in liberating them. Shia parties in the Iraqi parliament have rejected the plan but Abadi is hoping to persuade them to change their stance.

“It’s segregating people”, Musleh told MEE. “We were not formed in a spirit of sectarianism. Our aim is to liberate towns so that people can go home and to provide services, regardless of sect. The number one priority is to liberate our country.”