BANGUI (Reuters) - Central African Republic votes in a presidential election on Wednesday aimed at restoring democratic rule in a divided country gripped by years of violence in which thousands have died.

Thirty candidates are competing for the presidency. In the absence of opinion polls or an incumbent, a likely winner was difficult to predict, but leading candidates include former prime ministers Anicet-Georges Dologuele and Martin Ziguele.

Ziguele received a boost on Tuesday when anti-balaka militias said they would support his candidacy. Other top candidates include former Foreign Minister Karim Meckassoua, and Bilal Desire Nzanga-Kolingba, the son of a former president.

The election comes in the aftermath of a conflict that has forced nearly one-fifth of the country's 5 million people from their homes and left much of the North and East controlled by mainly Muslim groups that do not answer to the government.

The turmoil and an upsurge of violence in the capital Bangui in September repeatedly forced authorities to delay the polls. More recently some have cast doubts on whether the election can be organised successfully.

Mainly Muslim rebels from a group called the Seleka seized power in the majority Christian nation in early 2013, provoking reprisals from the Christian anti-balaka militias that triggered a cycle of religious killings.

Even so, many people in Bangui said they are desperate to vote and hope the election will bring change to the country, ruled since May 2014 by interim President Catherine Samba-Panza.

"I must vote because it's my duty as a citizen," said Jean-Jacques Youka, 40.

Gbenda Jocelyne, 37, said: "The campaign has gone well. The situation in our country is difficult. There are always problems but we will vote for a new president to bring back security."

Crucial to the election will be maintaining security and the United Nations peacekeeping mission, MINUSCA, has promised a heavy security presence.

During a referendum on a new constitution earlier this month, gunmen attacked voters in Bangui and the polls were also disrupted in Bossangoa, a Bozize stronghold, as well as in some areas in the Northeast under the control of Seleka factions.

There has been almost no progress towards disarming thousands of fighters loyal to rebel and militia leaders ahead of the vote, and disarmament will be a major challenge for the new president.

It was unclear when results will be announced for the presidency or in contests for hundreds of national assembly seats.