Volunteers of the Iraqi Shiite Badr Army militia patrol an area at eastern Tikrit city, northern Iraq, February 7, 2015. (Ali Mohammed/EPA)

Thousands of troops and militiamen amassed in northern Iraq on Saturday in preparation for a major offensive against the Islamic State-held city of Tikrit, and what Iraqi officials and militia commanders said would be an essential step toward the larger prize of Mosul.

Large convoys of Shiite fighters carrying flags and blaring battle songs began arriving in the ­government-held city of Samarra, 40 miles south of Tikrit, on Saturday afternoon, residents said. Qassim Soleimani, the leader of Iran’s elite Quds Force, was also in the city to oversee the operation, according to local officials.

Retaking roads and towns in Salahuddin province, wedged between Baghdad and militant-held Mosul, is necessary to shore up supply lines north from the capital for any future battles there. An operation to retake Tikrit would mark a major test for Iraqi forces, which have yet to regain a major population center from the militants.

“It will be a very hard fight,” said Jassim al-Jabara, head of the security committee for the Salahuddin provincial council, which urged remaining civilians to leave Tikrit and nearby al-Alam, ad Dawr and al-Bouajil. The operation will begin “very soon,” he said. Sheik Jassim al-Saidi, a commander with Kitaeb Hezbollah, and other militia leaders said the offensive could take 10 days .

In January, Iraqi Prime Minister Haider al-Abadi told Reuters that a campaign to retake Tikrit would be launched within a month. He said then that there was no timeline for an attack on Mosul, which requires more planning. A U.S. Central Command official said Thursday that an assault could begin in April or May, though military experts and Iraqi commanders have questioned whether the country’s ground forces would be ready.

The Islamic State ‘caliphate’ is in danger of losing a lifeline

The government is relying heavily on increasingly powerful Shiite militiamen for security, leaving the U.S.-led training program for regular forces struggling to catch up.

The Iranian-backed militias ­Kitaeb Hezbollah, Asaib Ahl al-Haq and the Badr Organization all confirmed that they had dispatched convoys of fighters to Samarra on Saturday, but they declined to give figures.

More than 10,000 militiamen have gathered and will attack from multiple fronts, according to Karim al-Nouri, spokesman and military commander for the Badr Organization, one of Iraq’s most prominent Shiite militias.

Some of them have amassed in Tuz Khurmatu, 60 miles east of Tikrit, where Badr commander Hadi al-Amiri is leading the operation, he said.

The Iraqi army, Sunni tribal fighters and the local police also will be involved, according to Jabara. Heavy artillery fire into the towns of al-Alam and ad Dawr had already begun Sunday.

A large-scale Shiite militia-led offensive in majority Sunni areas would raise concerns about the potential for sectarian killings, amid reports of atrocities.

The operation around Tikrit is particularly emotionally charged. The city was the location of a massacre of an estimated 1,700 soldiers in June as the Islamic State advanced, and many victims’ families are blaming the mass executions on local Sunni tribes.

It is not the first attempt to retake the city. A much-touted push for the city last summer, as former prime minister Nouri al-Maliki looked for a high-profile win in the dying days of his leadership, ended disastrously.

The home town of Iraq’s former president Saddam Hussein, a Sunni, Tikrit has long been a source of opposition to post-invasion ­Shiite-led governments.

“This will clear the road to Mosul,” said Naim al-Abboudi, a spokesman for Asaib Ahl al-Haq. He said thousands of the group’s militiamen were dispatched Saturday.

Badr’s Nouri also expressed confidence. “Once [Soleimani] arrives, it means the battle will be won,” he said of the Iranian commander who has become a familiar face on the battlefield in Iraq.