Over the past few months, the Islamic State has shifted tactics in Iraq, reverting to targeting civilian locations in the capital and other major cities. Iraq’s government, which has seen success in retaking territory, must now adjust as well.

On July 3, ISIS claimed responsibility for the suicide car bombing that killed over 300 Iraqis in Baghdad’s popular Karada district. This was the deadliest bombing since the 2003 U.S.-led invasion. The last time a bomb in the city killed even half as many people was seven years ago.

 The surge in attacks comes as the Islamic State is on the decline. Prime Minister Haider al-Abadi continues to celebrate the victories and liberation of Iraqi cities from IS fighters, most recently, a few weeks ago in Fallujah. The quick success of that operation has led many Iraqis to believe that Mosul, IS’s most coveted prize, can be taken by the end of this year – much sooner than officials and commentators in Baghdad once anticipated.

After suffering such military defeats, the Islamic State has had to change its modus operandi. The organization, which once sought to conquer and occupy territory in an effort to build a state, is more frequently resorting to asymmetrical warfare and attacks on civilian populations in Baghdad.

Iraqi forces, despite some internal divisions, are stronger today than they were during IS’ aggressive progress two years ago. Haider al-Abadi has reached a working compromise that has thus far proved successful in liberating Fallujah: Iraqi government forces, namely the Golden Division special operators, move into cities while the Popular Mobilization Forces (PMF) protect borders and provide support from the outskirts. Washington now directly funds and equips the peshmerga. U.S.-led airstrikes have proven critical in battles in Fallujah, Tikrit, Baiji, and Ramadi.

Since conventional battle has become difficult, the Islamic State is returning to the tried-and-tested tactics of its predecessor, al-Qaeda in Iraq. The organization also uses these attacks to instigate political division inside Baghdad. They provide the opportunity for Abadi’s opponents to discredit his leadership. Following the Karada bombing, former Prime Minister Nouri al-Maliki made several media appearances to criticize the security problems. He even told BBC that he could be ready to return as prime minister if necessary.

Although military defeats jeopardize the narrative of “victory,” for the Islamic State, attacks on civilians in Baghdad has become an easy way to maintain legitimacy and sustain the narrative of a powerful organization that strikes fear against national armies and citizens.

To address the tactical shift, Abadi has focused on increasing troop levels in Baghdad. According to a report, almost half of Iraq’s combat troops are now based in the capital. He has also worked to get rid of fake bomb detectors, increase aerial reconnaissance, and better fund military groups. The PMF leadership, moreover, has mobilized inside Baghdad to secure the so-called “belt areas,” where much of the attacks have occurred.

Despite these efforts, civilians in the capital are not being properly protected, mainly due to lack of coordination between the several security forces and intelligence agencies.

After the Karada attack, Interior Minister Mohammad Ghabban resigned from his post. In a damning critique, Ghabban said the government has failed to coordinate the different agencies in charge of parts of Baghdad’s security. These include the Ministry of Interior, two counter-terrorist units from the Prime Minister’s Office, and two regional security commands from the Ministry of Defense. Beyond these government agencies, various paramilitaries, with minimal accountability to government forces, are also in charge of the security of certain neighborhoods. Internal tensions between groups in the PMF, such as Muqtada al-Sadr Saraya al-Salam versus Qais Khazali’s Asaib Ahl al-Haq, make security coordination and intelligence sharing in Baghdad much more problematic.

This quilt of security actors works at best in parallel and at worst in opposition. As long as the internal security of Baghdad, or any other major city, is not under the command of one structure, the Islamic State will find it easier to carry out attacks. This is true even if Abadi increases troops, improves intelligence, and better mans checkpoints.

Analysts have offered various solutions. Some say suggest bringing together the U.S.-led coalition’s technology, planning, and intelligence expertise with Iraqi ground forces.

However, the solution must also include the emergence of a clearer and more effective structure to monitor and coordinate security and intelligence agencies. Abadi’s attempt to bring the various government agencies and non-government groups together, including Order 91, which makes the PMF as part of the Iraqi armed forces, has thus far failed.

Ideally, the answer is in the integration of the paramilitary groups. Although there is a PMF administrative office within Abadi’s office, the some 80 groups under the PMF remain autonomous entities. At times, they are at odds with the state or with each other.

Today, integration of these groups into the state apparatus is too distant a reality. As long as this is the case, however, Baghdad’s security and intelligence will be at the behest of different actors who do not always act in unison. This creates the ideal environment for the Islamic State to continue its tactical shift and stage attacks in Baghdad.

This is article was originally published on Defense One