AS IRAQ suffers its worst bloodshed since American troops led the expulsion of al-Qaeda from most of the country six years ago, Nuri al-Maliki, Iraq’s embattled prime minister, arrived in Washington on October 29th. He is demanding military assistance to prevent his security forces from being overwhelmed in a swathe of the country. For he is in dire trouble.

In a string of disaffected cities populated by Iraq’s aggrieved Sunni Muslim minority, Iraqi troops loyal to Mr Maliki’s government, which is led by members of the Shia majority, have had to withdraw. In others, his forces have been weakened by desertion. “Let’s face it,” said an Iraqi bigwig on the eve of Mr Maliki’s departure to America, “we are failing on security.”

Since April around 5,000 Iraqis have been killed, mainly by Sunni insurgents setting off bombs and launching attacks in Shia areas. On October 27th alone, at least 54 people were killed in Baghdad and Mosul, the biggest city in Iraq’s north.

Many other attacks have taken place in Anbar, a vast province to the west of Baghdad that abuts Syria and Jordan. Two weeks ago eight suicide bombers acting simultaneously—a remarkable feat, even by al-Qaeda’s standards—attacked government buildings in Rawa, a town north-west of Baghdad on the Euphrates river close to the border with Syria, while a suicide-bomber drove a lorry into a police checkpoint near Rutba, due west of Baghdad, on the main road to Jordan.

Iraq’s security forces have withdrawn from key towns in Anbar, such as Falluja and Ramadi, and from a mainly Sunni area in the neighbouring province of Salaheddin. Instead they hole up in nearby barracks but seem unable or unwilling to patrol the streets. In the sullen northern city of Mosul, al-Qaeda is also again making its presence heavily felt, collecting protection money to help pay for its operations.

Mr Maliki wants the Americans, whose troops withdrew from Iraq at the end of 2011, to supply Apache helicopters and Predator drones, among other things. His aides stress that “al-Qaeda is a common threat to everyone.” Indeed, a group responsible for many of the recent wave of bombings, the Islamic State of Iraq and Syria (ISIS), gives its allegiance to al-Qaeda. The Iraqis have also hinted that, as a quid pro quo, they may be able to help the United States in its negotiations with Iran over its nuclear programme, since the regimes in Baghdad and Tehran have grown increasingly close. Mr Obama will struggle to meet all Mr Maliki’s requests. Helicopters are in the pipeline, along with F-16 fighter jets that are of little use against insurgents. But an influential clutch of senators recently advised the president not to help Mr Maliki unless he tries a lot harder to share power with Iraq’s Sunni and Kurdish minorities. “The failure of governance is driving many Sunni Iraqis into the arms of al-Qaeda in Iraq and fuelling the rise of violence”, wrote the senators, including Carl Levin, head of the armed services committee. Others bemoaned Mr Maliki’s cosiness with Bashar Assad and his regime in Syria. What Mr Maliki needs more than weapons is the will to compromise with his political opponents, especially Sunnis but also Kurds. In the past year Sunnis have felt more and more excluded and harassed. In addition, the civil strife churning up Syria has spilt across the border into Iraq. As well as opposing Iraq’s Shia-led security forces, ISIS and other groups have taken to attacking the Sunni tribal militias which have previously opposed al-Qaeda under a scheme known as the Sahwa, or Awakening, encouraged by the Americans as part of their “surge” in 2007. With the agreement of tribal elders, Sunni communities had been persuaded to turn against al-Qaeda and drive it out of their towns and villages to the north and west of Baghdad. But after the Americans left, the Sahwa was more or less ditched by an Iraqi government loth to countenance the existence of any armed Sunni groups beyond its central control of Baghdad. Most of the tribal elders have now withdrawn their co-operation with Mr Maliki’s government.

Too fearful to conduct patrols in the streets, the security forces have been carrying out raids and mass arrests, further enraging Sunni civilians. “At the moment what fuels the conflict the most is the presence of central-government security forces in Sunni areas, where they arrest young men by the hundreds, torture them and then release them after money is paid,” says a seasoned foreign-aid worker. “You can see al-Qaeda benefiting from the heavy-handed presence of the armed forces,” he adds. Hostility to the government is not only sectarian; it is also the result of the government’s failure to do much for its citizens, says the aid worker. The erratic supply of electricity and the blight of corruption make matters worse.

Meanwhile, government is often dysfunctional and parliament frequently fails to pass vital legislation. Mr Maliki has been unable, since his re-election more than three years ago, to appoint either an interior minister or a defence minister, so has overseen both ministries himself. The federal president, Jalal Talabani, a Kurd, who is sometimes regarded as one of Iraq’s few unifying figures, has been out of the country since the end of last year, following a stroke. Both the Speaker and a leading Shia clergyman have publicly called on Kurdish officials to declare whether he is still alive. The spirit of compromise is in even more urgent need of resuscitation.