BAGHDAD (Reuters) - Iraq will close its airports and border crossings for 24 hours during its May 12 election, the first held since it defeated Islamic State militants, the electoral security committee said on Wednesday.

The shutdown will come into effect at midnight on Friday.

Security forces will also suspend travel between provinces and restrict the movement of vehicles on Saturday, before easing the measures “gradually” after polls close, a spokesman for the committee told a news conference.

Islamic State militants have threatened to carry out attacks ahead of the elections and have warned Sunni Arabs not to participate.

The group swept through a third of Iraqi territory in 2014, but all towns and villages were recaptured after more than three years of fighting by government and Kurdish forces backed by a U.S.-led coalition, and Shi’ite militias backed by Iran.

Prime Minister Haider al-Abadi declared nationwide victory over Islamic State in December, five months after his forces recaptured Iraq’s main northern city Mosul in a protracted battle with the jihadist militants.

Islamic State, however, continues to carry out bombings, assassinations and ambushes, and remains active in neighboring Syria where it has also lost most of its territory.