BAGHDAD -- Islamic State militants ambushed a bus carrying Shiite Muslim paramilitary fighters in northern Iraq, killing six militiamen and wounding 31 others in one of the deadliest attacks in recent months, Iraqi officials said Thursday.

Prime Minister Adel Abdul-Mahdi opened an investigation into the attack, which took place late Wednesday near the town of Makhmour, south of the northern city of Mosul.

An official from the government-sanctioned Popular Mobilization Forces said the bus was en route from Mosul to the oil-rich city of Kirkuk. He spoke on condition of anonymity because he wasn't authorized to talk to reporters. He blamed the attack on the Islamic State group, which was vanquished in Iraq in late 2017 but has recently stepped up activities.

The wounded were transported to the nearest health-care facility in the nearby town of Qayyarah, in Nineveh Province.

IS, which seized Iraqi cities and declared a self-styled Islamic caliphate in territories it controls in Syria and Iraq, was formally declared defeated in Iraq following a three-year bloody battle that left tens of thousands dead and Iraqi cities in ruins.

The group's sleeper cells are still carrying out deadly attacks in northern and western Iraq and have in the past few months staged kidnappings, killings and ambush operations, particularly against Iraqi forces and the Popular Mobilization Forces, the predominantly Shiite and Iran-backed umbrella group that fought IS alongside the Iraqi military.

Also on Thursday, in the southern city of Basra police used tear gas to disperse a group of around 250 protesters outside the provincial building, headquarters of the local government.

Protesters, some of them wearing green vests similar to the "gilets jaune" yellow vests worn by protesters in France, denounced the "corruption" and "mismanagement" of services by the local and federal governments.

Earlier, coordination committees in al-Basra called on people to demonstrate peacefully.

The city saw violent riots in the summer over acute water pollution and crippling power outages, during which demonstrators set fire to government buildings, their anger reaching a boiling point.