According to an army official, Prime Minister Haidar al-Abadi left the northern Iraqi province only minutes before the strike.
Mortar fire, from Daesh-held territories in northern Iraq, narrowly missed Iraqi Prime Minister Haidar al-Abadi on Friday, a military source said.
The attack came during al-Abadi's first visit to the oil-rich province of Kirkuk since becoming president. He met regional officials and discussed the liberation of Daesh-controlled areas. Daesh has remained in control of southern Kirkuk since 2014.
"Al-Abadi had visited a military site in the Maktab Khalid area in a southwestern district of Kirkuk city," said Captain Ahmed Zeidan, an Iraqi army officer. "Only minutes after his departure, the site was hit by three mortar shells."
According to Zeidan, the mortar fire had originated from areas held by the Daesh, a designated terrorist group.
The mortar attack did not lead to any casualties among security personnel, the officer noted.
Al-Abadi, accompanied by a military delegation, arrived in Kirkuk earlier on Thursday to inspect positions held by Kurdish Peshmerga forces.
Speaking to Peshmerga officers, al Abadi said his visit had come in advance of planned operations to retake Kirkuk's Hawija district – and the rest of the province – from Daesh.