Port-au-Prince (AFP) - After three years of delayed polls and simmering political unrest, Haiti's rusty electoral machinery is finally grinding into gear.

By the end of the year, the impoverished Caribbean republic ought to have a newly elected president, parliament and local municipal governments -- a test for any developing nation.

Haitians have not been able to vote in an election since popular singer Michel Martelly won the presidency in a controversial 2011 poll.

Since then, presidential nominees have replaced elected mayors in many towns and the Senate and House of Representatives have shrunk away.

But the long delay has not dampened the ambition of Haiti's political elite.

More than 120 parties have registered to take part in the contests, in a country of scarcely 11 million with a checkered electoral past.

Not all will field candidates for all the races, but the sheer number of factions will add to the challenge facing organizers in an unruly country reeling from an earthquake and a cholera epidemic.

"We can't restrict a citizen's right to form a political party," sighed Mosler Georges, executive director of the Provisional Electoral Council (CEP).

"But we have to admit it's going to be difficult in logistical terms."

The numbers underline Haiti's challenge.

Between mayors, town councilors, deputies, senators and the president, more than 6,000 seats are up for grabs in races spread across three polling days on August 9, October 25 and December 27.

It shouldn't have been such a marathon. Under Haiti's young constitution, most of the contests should have been fought months or even years ago at well-spaced intervals.

But things are rarely easy in Haiti. Martelly's camp and the divided but determined opposition have been at daggers drawn for years, and their stand-off disrupted the program.

Parliament accused the president of trying to stuff the electoral commission with his supporters. The presidency accused lawmakers of delaying a vote on a key electoral law.

As months went by without any votes, local councilors and national lawmakers saw their mandates expire with no replacements named.

On January 12, the national parliament fell into disuse, with too few members to form a quorum to vote on legislation.

Under pressure from the street, where opposition demonstrations were getting louder, and from nervous foreign capitals, Martelly issued a March 2 decree.

There would at last be elections.

Pretenders to the presidency are supposed to register their intent during the second week of May, but already dozens of names are circulating.

"If we have 50 or 60 presidential candidates, you can just imagine how long the ballot paper will be," Georges told AFP.

Long indeed. Alongside each name on the ballot there must be the candidate's photo, campaign logo and party registration number.

Around half of the population is illiterate and might otherwise struggle to pick a name.

"So everyone wants either number one or number 10," George said.

Candidate Number One will be easy to find at the top of the ballot, he explained, and: "Ten is Lionel Messi's shirt number."

Argentine footballers may be better known to Haitians than their own leaders, but there is a greater challenge facing poll organizers: Money.

Haiti, already lagging behind its neighbors because of its brutal colonial history and recent years of dictatorship and rebellion, was devastated by a 2010 earthquake.

The unprecedented disaster killed 200,000 people and demolished much of the capital, Port-au-Prince. The World Bank estimated the damage as the equivalent of 120 percent of annual GDP.

Haiti has been slowly rebuilding, but much of the international aid promised in the wake of quake either never arrived or was spent on short-term disaster relief efforts rather than sustained development.

The country suffered another setback when a cholera epidemic, widely and credibly blamed on the poor hygiene of a UN peacekeeping unit, killed thousands more.

- Fear of violence -

Now Haiti needs to pay to organize elections.

The CEP estimates the cost at $60 million (50 million euros). Haiti has found $13.8 million itself and foreign donors offered $24 million more -- leaving a shortfall of around a quarter of the cost.

But despite the logistical and financial hurdles, for most in Haiti the main threat to polling is the fear of fraud, violence and intimidation.

Every election organized in Haiti since the fall of brutal strongman Jean-Claude "Baby Doc" Duvalier in 1986 has been marred by unrest.

To this day, the country has only 12,000 police officers, and the United Nations is slashing the size of its international peacekeeping force.

Between now and July, despite the approach of polling, the Blue Helmet force will be cut in half again to only 2,370 troops.

The foreign troops are often unpopular on the streets, but Haitian authorities have come to rely on them.

In January, when a delegation of ambassadors from member states of the UN Security Council came to visit, Justice Minister Pierre Richard Casimir pleaded for a larger force.

His request fell on deaf ears.

Finally, after all the expense and risk, how many of Haiti's six million voters even take part? In 2011's presidential race, turnout was less than a third.