TIKRIT, Iraq, Nov 6 (Reuters) - Suicide bombers driving ambulances packed with explosives detonated their vehicles at a checkpoint and a car park for Shi’ite pilgrims in two Iraqi cities on Sunday, killing at least 21 people and wounding dozens, officials said.

The twin attacks took place in Tikrit and Samarra, as Iraqi troops and security forces battled to retake the northern city of Mosul from Islamic State militants who have controlled it for more than two years.

They appeared to be part of a series of diversionary attacks by the ultra-hardline Sunni Islamists, who have struck the Kurdish-controlled city of Kirkuk, the capital Baghdad and a western desert town during the three-week Mosul campaign.

Islamic State’s Amaq news agency said the attacks were carried out by the militant group.

In Tikrit, a bomber detonated his explosives-laden ambulance at the southern entrance to the city during the morning rush hour, killing 13 people, police and hospital sources said.

Another attacker detonated a vehicle in a car park for pilgrims visiting one of Shi’ite Islam’s holiest shrines, al-Askari mosque in Samarra, south of Tikrit.

The bomb killed at least eight people, local officials said, including two Iranian pilgrims. The local operation command, a joint military and police unit, said the vehicle used in Samarra was also an ambulance.

Authorities in both cities declared curfews, fearing possible further attacks.

Amaq said two suicide bombers struck in Samarra, the first detonating a car bomb and the second activating an explosives vest among a group of people who survived the first blast. It said the Tikrit attack was carried out by a single car bomber.

Iraqi troops and security forces, backed by a U.S.-led international coalition, are battling Islamic State in the northern city of Mosul. Special forces have entered eastern districts, where they faced fierce resistance from the militants who deployed car bombs, snipers and mortar fire against them