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. […]