As Abu Bakr al-Baghdadi, the leader of the Islamic State of Iraq and the Levant (Isis), declares himself the caliph of a new Islamic state larger in size than Great Britain, people in Baghdad wait for a fresh assault on the capital by his fighters, who have already captured much of northern Iraq.

The move by al-Baghdadi and Isis, which wants to be known as simply the Islamic State, has the power to convulse many of the 57 countries that follow the Islamic faith. The group’s spokesman, Abu Mohamed al-Adnani, said: “The legality of all emirates, groups, states and organisations becomes null by the expansion of the caliph’s authority and the arrival of its troops to their areas.”

It is not that all Islamic radicals will rise up to follow the new caliph, but his message will attract many followers and will force other jihadi groups to choose if they are going to follow the new leader. “Listen to your caliph and obey him. Support your state, which grows every day,’’ Mr Adnani said.

For Iraq the declaration of a new caliphate, to replace the one abolished 90 years ago by Mustafa Kemal Ataturk in Turkey in 1924, is a declaration of war, because the Islamic State is viscerally anti-Shia – who make up 60 per cent of Iraq’s population and who it regards as heretics and apostates worthy of death. Its propaganda films show Shia truck drivers being questioned about how Sunni pray and, if they fail the test, they are shot in the head.

For people in Baghdad, a city of seven million people, the majority Shia, the expansion of the newly declared Islamic State is a terrifying prospect. The government counter-offensive towards Tikrit, 80 miles to the north, has stalled or been repulsed. As yet there has been no uprising by the Sunni enclaves in Baghdad or a renewed suicide bombing campaign in the capital, but Baghdadis think it could happen at any moment.

In a wide ranging interview on security questions with The Independent in Baghdad, Safa Hussein Al-Sheikh, Iraq’s Deputy National Security Adviser, said: “Many people think there will be synchronised attacks inside and outside [Baghdad].” He said Isis had the capability to do more, and to try to repeat what it achieved in Mosul, which it captured on 10 June, adding that there were some reports of insurgents seeking to slip into Baghdad along with genuine refugees from the north. “Some days ago there were weapons discovered in one of the mosques in the al-Amariya area,” he said.

Mr Sheikh said one scenario was that there would be an assault from outside Baghdad accompanied by many attacks inside the city “to affect psychologically the security forces defending Baghdad from the outside.” But, at the end of the day, he did not believe that Isis “has a chance in Baghdad. They can do disruption but they can’t do any victory.” Aside from the regular army, the capital is now packed with tens of thousands of Shia militiamen summoned by a fatwa from Grand Ayatollah Ali al-Sistani.

Many Sunni leaders inside and outside Iraq have criticised or derided al-Baghdadi’s declaration of a new caliphate, but it will have a deep appeal for millions of young Sunni men for whom the political and economic status quo promises nothing but joblessness and poverty.

Mr Sheikh said the establishment of the caliphate would increase “the recruitment of jihadis” into Isis. “They will get more recruits from abroad.” One piece of evidence for this is the celebrations and waving of the black Isis flag in the strongly Sunni and tribal town of Maan in Jordan, far from any Isis strongholds.

The Islamic State has a large territory from which to draw recruits and money. In the past, the Iraqi security forces found that when al-Qaida in Iraq took over an area, it could recruit between five and 10 times the original attack force. If it had used 100 men then it could expect to recruit 500 or 1,000 fighters. These might not be shock troops, and many would have joined to protect their families, but the numbers fighting for Isis have grown rapidly.

As the Iraqi Sunni, which number about five or six million, find they have joined a new state, the country as a whole is about to get a new leader. It is now considered that there is no chance of Nouri al-Maliki retaining the job he has held since 2006. Although his coalition of parties did well in the parliamentary election of 30 April, he has been discredited by the loss of Mosul and the collapse of the army in northern Iraq. He was acting as Defence Minister, Interior Minister and supreme commander of the army, so it is impossible for him to avoid personal responsibility for the debacle.

The call of Grand Ayatollah Sistani, who makes a point of not involving himself in politics, last Friday for new leadership is regarded as decisive in ending Mr Maliki’s rule, which has been characterised by all-embracing corruption as politicians and officials syphoned off billions of dollars into shell companies abroad. Some $7bn was spent on Baghdad’s sewer system but when rains fell last year the streets flooded because the sewers had never been built.

Corruption was also at heart of the rapid disintegration of the 350,000-strong armed forces when Isis attacked. Commanders drew the salaries for “ghost battalions” that didn’t exist, receiving money to feed a battalion of 600 men when in fact there were only 200.

Despite the vast expenditure on the army, said to total $41.6bn in the past three years, units were sent to the front short of ammunition with only four magazines for each assault rifle. Isis produced chilling videos showing the ease with which its snipers could wound and kill soldiers.

ORDER IT NOW

Mr Sheikh said one of the problems for the Iraqi security forces has been that al-Qa’ida in Iraq, which preceded Isis, had consisted of “small terrorist groups that could be combatted by police work”. But after 2011 Isis units began to gain military experience in Syria that was superior to the Iraqi armed forces’. This enabled Isis to hold on to Fallujah, 40 miles west of Baghdad, which it captured with local allies in January.

Iraqi officials say the morale of the army has improved since the humiliating loss of Mosul, almost without a fight. It has been strengthened by militias such as Asaib Ahl al-Haq and the followers of the Shia nationalist cleric Muqtada al-Sadr that have been deployed for the first time around Fallujah. Some of these militiamen have been fighting against jihadis in Syria over the past three years and have military experience.

Iraqis as a whole are either bemused or cynical about the US, Britain and Sunni Arab states such as Saudi Arabia, Qatar, Jordan and Turkey claiming to support moderate Sunni rebels in Syria but not jihadis. Officials are dubious that such moderate rebels really exist.

In any case, Mr Sheikh says that once weapons are supplied to militia forces in Syria or elsewhere they invariably find their way into the hands of extremists. He cites as an example Iranian weapons supplied to Shia militias in Iraq after 2004 that ended up in the hands of al-Qa’ida, which was killing Shia, because they were sold or went to middlemen working for both sides.

Isis is not the only armed opponent of the Baghdad government although it is the most effective one. The Iraqi state has also been hit in the past three weeks by the Kurdish takeover of long disputed territories in the north including Kirkuk, which are now held by Peshmerga (Kurdish soldiers). Baghdad officials note suspiciously that a mainly Kurdish regular army division did not fight for Mosul, but add that to be fair this was also true of mainly Sunni and Shia divisions as well.

The regime and its foreign allies hope that a new government in Baghdad will be able to offer the Sunni community in Iraq a big enough share in power for Isis’s “fight only for victory” strategy to become increasingly unattractive. Mr Maliki would no longer be in office as a hate figure uniting the Sunni against Baghdad.

Life is already becoming miserable in Isis-held Mosul, with no money in the banks to pay people their pensions or salaries. Isis has not conducted any mass killings in the city but has made people nervous by collecting the names of all those who once worked for the government. In Tikrit the 200,000 population has largely fled because of lack of electricity and water, and fear of indiscriminate bombing.

But it will difficult and dangerous for Sunni military groups and organisations which allied themselves to Isis to get rid of men who believe they are establishing the new caliphate and believe that God and history are on their side. The Islamic State of its new caliph, Abu Bakr al-Baghdadi, has many enemies but it will not go down easily.

PATRICK COCKBURN is the author of Muqtada: Muqtada Al-Sadr, the Shia Revival, and the Struggle for Iraq.