Nigeria has ordered the closure of all its land and sea borders ahead of Saturday’s tightly contested elections.
Intelligence reports indicated that foreigners planned to cross into Nigeria to vote, Interior Minister Patrick Abba Moro told the BBC.
The presidential and parliamentary polls are expected to be the most tightly contested since military rule ended in 1999.
Nigeria is also battling an insurgency along its northern-eastern border.
Regional forces have been recapturing territory from the Boko Haram insurgents in the last six weeks.
A government statement said the borders would be shut from midnight on Wednesday to midnight on Saturday, local time, to ensure the vote went off peacefully.
President Goodluck Jonathan is facing a strong challenge from ex-military ruler Muhammadu Buhari.
Thousands of Nigerians who fled the six-year insurgency, and are taking refuge in neighbouring states, would not be able to vote, reports the BBC’s Habiba Adamu from the capital, Abuja.
Boko Haram has carried out cross-border raids in Cameroon, Niger and Chad.
It has denounced the elections as un-Islamic.
A state of emergency is in force in Borno, Yobe and Adamawa, three Nigerian states where Boko Haram is strongest.