Nigeria's president and his top challenger in Saturday's election have signed a pledge of peace ahead of a vote marked by heated accusations that have alarmed some observers.

President Muhammadu Buhari, who seeks a second term, and former Vice President Atiku Abubakar on Wednesday vowed to participate in a free and fair election in Africa's most populous country without "religious incitement" or ethnic profiling.

Past elections in Nigeria have included deadly violence, though the previous vote in 2015 was seen as relatively calm. It saw the first defeat of an incumbent and first democratic transfer of power between parties.

This time the top two parties have hurled accusations of vote-rigging plots.

With tempers high, local media report that Nigeria's inspector general of police has assured protection to foreign election observers.