Four people were killed in an attack believed to have been mounted by Islamic State militants in Northern Iraq, a Security Official said on Friday, a day before parliamentary elections.

Gunmen attacked a security checkpoint at dawn that was manned by members of the Public Mobilisation pro-government militia east of the town of Tikrit, said Brig- Baha al-Duri.

Al-Duri said the fatalities were two militiamen and two civilians who lived nearby.

The assailants fled the scene.

Hundreds of Islamic State extremists are still active in the nearby rugged area of Mteibeja located between the northern provinces of Diyala and Salah al-Din.

READ: Landlord's Children Beat Up Couple Over Rent

On Saturday, Iraq would hold its first parliamentary elections since it declared that it had defeated Islamic State late in 2017.

In April, Islamic State threatened to attack polling stations, saying that anyone who participates in the vote would be targeted as an infidel.

Authorities said they would close the country’s border crossings and airports later on Friday until the end of the one-day vote as part of stringent security measures.

In December, Iraq declared victory over Islamic State, having recaptured all the territory captured by the extremists in 2014 and 2015.

Cells believed to be linked to the radical group have since launched scattered attacks in different parts of Iraq.

WATCH: Nigerians speak about Buhari's second term plan