election, the interior ministry said on Wednesday.
The closure will take effect from midnight (2300 GMT Wednesday) until the same time on Saturday, after polling closes for presidential and parliamentary elections.
The ministry said in a statement that the move was designed "to allow for peaceful conduct of the forthcoming national elections".
Nigeria is bordered by Benin to the west, Cameroon to the east and also had borders with Chad and Niger in the north.
Security is always a major issue at Nigerian elections, with politically linked violence often flaring between supporters of rival parties.In the last elections in 2011, about 1,000 people were killed in clashes after opposition candidate Muhammadu Buhari was beaten by Jonathan for the presidency.
The two men are again contesting this year's election, with many predicting that the vote -- delayed for six weeks because of military operations against Boko Haram -- is too close to call.
On Tuesday, Nigeria's federal police chief ordered the "total restriction" of vehicles between 8:00 am and 5:00 pm on election day, apart from the emergency services and others on "essential duties".