Campaigning for Nigeria's presidential elections has ended with the two leading candidates delivering their final messages to supporters before the crunch vote.

Saturday's election is seen as the closest race in the country's history, with President Goodluck Jonathan facing a strong challenge from former military ruler Muhammadu Buhari.

Land and sea borders were shut at midnight on Wednesday (2300 GMT) as part of stringent security measures that also include an eight-hour restriction on movement when polling stations open.

Nigeria has a history of election-related unrest and both candidates appeared keen to prevent a repeat of 2011, when 1,000 people were killed in clashes after the results were announced.

US Ambassador to Nigeria optimistic about peaceful elections

This time around, fears of Boko Haram suicide attacks and bombings at vulnerable targets, including polling stations, have seen unprecedented calls for vigilance from the security services.

Commitment to peaceful vote

Jonathan and Buhari signed a pledge of non-violence in January and on Thursday repeated their commitment to peaceful elections.

Buhari, 72, who headed a military government in the 1980s and describes himself as a "converted democrat", has for his part pushed an agenda of "change".

He criticised "insecurity, broken infrastructure and growing inequality", vowing action against Boko Haram and corruption, which he said had made Nigeria "a laughing stock of the world".

"Rebuilding the army and other security agencies will... be a top priority of my government. I will ensure that never again will terrorists find a safe haven in Nigeria," he added.

He said he would also reunite the more than 200 schoolgirls kidnapped by the group in April last year with their families.

Recognising the challenge from Buhari and his All Progressives Congress (APC) which could see his ruling party defeated for the first time since the end of military rule in 1999, Jonathan, 57, is campaigning for continuity and has vowed to complete the work he started in his first four years in office.

"I need you to vote for me in this election, not just because of me, but so that we consolidate on the progress we have made," he wrote in a message published on the front page of many national newspapers.

Meanwhile, the electoral commission charged with organising the election in Africa's most populous nation said it was on track for a smooth operation.

Some 68.8 million voters out of a total population of some 173 million are registered to vote in Nigeria, which is also Africa's leading economy and top oil producer.

Nigeria's 2015 Elections Explained in One Minute

Source: Al Jazeera and agencies