The Islamic State group, on the defensive and under heavy pressure in Iraq, has struck back with bloody attacks in Baghdad, where persistent gaps in security increase the city's exposure.
In doing so, IS can portray itself as still being on the offensive, draw attention away from the setbacks it has suffered, and obtain media attention unrelated to losses.
The spike in Baghdad attacks -- which have killed more than 140 people in the city over the past seven days -- also comes at a time of high political tension in the capital that affords militants an opportunity to sow further discord.
Carrying out bombings is not a new strategy for IS -- it has been a key part of the jihadists' offensive and defensive tactics for years, and the group never fully stopped attacks in Baghdad.
But IS's attention was increasingly focused outside Baghdad after it overran large areas north and west of the city in 2014, and attacks in the capital decreased.
"Baghdad is now being targeted because the group is on the defensive and they can still hurt the government in their capital," said Patrick Skinner, a former CIA case officer who is now with The Soufan Group consultancy.
"They still use (bombs) in assaults... But there's clearly some car and vest bomb makers in the Baghdad belt and in the capital, leading to the increased and likely sustained carnage," Skinner said.
Colonel Steve Warren, the spokesman for the international operation against IS, cited jihadist battlefield setbacks as the primary motivation for the increase in Baghdad attacks.
But he also said that IS may see political turmoil in the capital as "an opportunity they can try to exploit using truck bombs."
The increase in attacks coincides with a political crisis over Prime Minister Haider al-Abadi's efforts to replace the current cabinet.
The crisis has paralysed the legislature for weeks, and demonstrators angered by lawmakers' lack of progress stormed parliament last month.
The deadliest of the recent attacks were triple car bombings that hit Baghdad last Thursday, killing at least 94 people, while attacks in three areas of the city on Tuesday killed at least 48 more.
Signup to our newsletter and follow us on Facebook and Twitter!
- Fake bomb detectors -
Iraqi security forces performed dismally during the early days of IS's 2014 offensive, abandoning large quantities of weapons and vehicles as they fled.
But Baghdad's forces have since regained significant ground from IS with the backing of US-led air support and training, retaking the cities of Tikrit and Ramadi as well as numerous towns and villages.
While the coalition has trained around 22,000 Iraqi security personnel, its efforts have focused on readying troops for offensive operations against IS, not on the forces in Baghdad.
Both Warren and Iraqi security spokesman Yahya Rasool said that coalition-trained forces are not deployed in the capital.
Though bombings in Baghdad decreased after June 2014, IS never lost the ability to carry out attacks in the capital.
While no security forces can completely secure a city against bombings by militants, flaws in Baghdad security procedures make IS's task easier than it might otherwise be.
Fake bomb detectors are still in widespread use in Baghdad, even though James McCormick, the man who marketed them to Iraq, was sentenced to 10 years in prison in 2013 for fraud in connection with the devices.
Some Iraqi officials have been reluctant to admit the failure of the "detectors," and former premier Nuri al-Maliki even insisted at one point that some of them were actually functional.
The devices are often used as the primary means of detecting explosives and weapons at Baghdad checkpoints, checks of IDs and searches of vehicles in the city are cursory if they take place at all, and weapons are frequently not kept close to hand.
Anger over the attacks adds to pressure on Abadi, who reacted Tuesday by directing Iraqi forces to step up efforts to uncover cells behind the bombings, and ordered the arrest of a security official responsible for one area that was targeted.
"It's a bloody confluence of trends," Skinner said of the increase in Baghdad attacks.
The jihadists are "under massive military pressure" while there is "a political crisis that they can tie into for maximum chaos," he said.