BAGHDAD -  Around 55 people were killed in Iraq in attacks on Saturday that targeted a Shia gathering, a police check-point and the family of a Sunni paramilitary leader opposed to Islamic State, according to security and medical sources.

The escalation comes as Iraqi forces are getting ready to launch an offensive to take back Mosul, the last Iraqi city still under control of Islamic State, in northern Iraq.

The heaviest toll was caused by a suicide bomber who detonated an explosive vest in the middle of a Shia gathering in Baghdad, killing at least 41 people and wounding 33. Some people were also in the tent to mourn the death of a local resident, authorities said. The tent was set up in a crowded market in the city’s northern al-Shaab district.

Gunmen believed to belong to Islamic State, a Sunni group, earlier in the day staged two attacks north of Baghdad, one targeting a police check-point and the other the house of a Sunni militia chief who supports the government, police sources said.

Eight policemen were killed and 11 others wounded in the first attack which took place Mutaibija, south of the city of the city of Tikrit, while the militants had three dead in their ranks.

In the second, the wife and three children of Numan al-Mujamaie, the leader of the Ishaqi Mobilization militia, were killed when gunmen stormed his house in the town of Ishaq in his absence.  The assailants fled, chased by security forces, and later killed themselves by detonating explosive belts, police said.

Islamic State has intensified bomb attacks in government-held areas this year as it loses territory to US-backed Iraqi government forces and Iranian-backed Shia militias. The group claimed a truck bombing in July that killed at least 324 people in the Karrada shopping area of Baghdad - the deadliest single attack in Iraq since the US-led invasion that toppled Saddam Hussein in 2003.

Meanwihle, Turkish President Tayyip Erdogan said on Saturday that Iraq could not deal alone with driving Islamic State from the city of Mosul and that the presence of Turkish forces in a nearby military camp was an insurance against attacks on Turkey.

Turkey has been locked in a row with Iraq’s central government about the presence of Turkish troops at the Bashiqa camp in northern Iraq, and over who should take part in the planned US-backed assault on Mosul.

“We won’t let Mosul be given to Daesh (Islamic State) or any other terrorist organisation. They say Iraq’s central government needs to approve this but the Iraqi central government should first deal with their own problems,” Erdogan said.

“Why did you let Daesh enter Iraq, why did you let Daesh enter Mosul? They were almost going to come to Baghdad, where are you, the central government of Iraq?” he said in a speech at a ceremony in the Black Sea town of Rize, broadcast live on TV.

Turkey fears that Shi’ite militias, which the Iraqi army has relied on in the past, will be used in the planned Mosul offensive, expected to start this month, stoking sectarian unrest and triggering an exodus of refugees.

Turkish soldiers have been training Sunni Muslim and allied Kurdish peshmerga units at the Bashiqa camp near Mosul, and want them to be involved in the assault. Baghdad objects to the Turkish military presence there.

“Nobody should talk about our Bashiqa base. We will stay there. Bashiqa is our insurance against any kind of terrorist activities in Turkey,” Erdogan said.

The United States has said any foreign forces in Iraq should have the approval of the Baghdad government.

Iraqi Kurdish leader Massud Barzani said Saturday that preparations for the operation to retake Mosul from jihadists have been completed and it is time for the battle to begin.

Forces from Iraq’s autonomous Kurdish region are expected to play a major role in the battle for Mosul, the country’s second city, which has been held by the Islamic State group since June 2014.

“The time has come to begin the liberation of Mosul,” a post on Barzani’s official Twitter account said.

“All preparations for the battle to liberate Mosul have been completed,” he said in a statement on the Kurdish regional presidency’s website.

The launch of the operation is expected to be announced soon, but it will mark only the start of a battle that is likely to be the most difficult and complex yet in the war against IS.

Once the battle is announced, a coalition of heterogenous and sometimes rival Iraqi forces will have to fight their way through IS defences to reach the city, in some cases over distances of dozens of kilometres (miles).

Then they will likely seek to surround the city before launching an assault, marking the start of deadly street fighting with die-hard jihadists in a city with a large civilian population.

The battle may spark a humanitarian crisis, with the United Nations warning that up to one million people may be displaced by the fighting as winter sets in.