Voting is underway in the Ivory Coast as President Alassane Ouattara seeks a third contested term in an election that two of the four candidates have urged their supporters to boycott.

The vote is seen as a test of stability as 30 people have been killed in pre-election violence, evoking the memories of the 2010 vote, which unleashed a brief civil war that killed 3,000 people after former president Laurent Gbagbo refused to step down.

"Why is it important for me to come and vote? I want the situation in the country to be clarified so that all of us can live in peace," said Barakissa Cissé, a shopkeeper.

Ouattara,78, initially told supporters he would step down but he decided to run again after his chosen successor died suddenly in July.

The president says he can run again under a new constitution approved in 2016. But his opponents say he is breaking the law as the constitution limits presidents to two-term.

Ouattara's two main rivals former president Henri Konan Bedie and former prime minister Pascal Affi N’Guessan, have called for an election boycott.

But voters turned out when polling stations opened at 8:00 am (0700 GMT).

"It's a way of showing that we want a change, that's what we're here for, to show that we agree or disagree, so it's in the ballot box," said Mohamed Fofana, a student.

Bedie and opposition leaders also accuse the electoral commission and the constitutional court of favouring the government.

The ballot in French-speaking West Africa's economic powerhouse, which is the world's biggest cocoa producer, is a crunch test for the region.

Nigeria is facing widespread social protests, Mali is emerging from a coup and jihadist violence wracks the Sahel.

The UN has urged calm and 35,000 police and security force officials have been mobilised to secure the election.