Violence has marred the start of Burundi's presidential election, already hit by opposition boycotts and protests over President Pierre Nkurunziza's decision to run for a third term.

Blasts and gunfire echoed around the capital in a nation grappling with its worst crisis since a civil war ended in 2005. It has faced weeks of demonstrations, a failed coup and clashes between rebel soldiers and the army.

Willy Nyamitwe, the presidential adviser for information and media, said two policemen were shot dead in the capital, Bujumbura. The body of a man was found on the roadside. Residents in the Nyakabiga district, where the body was discovered, identified the man as an official in the opposition MSD party and accused the government of killing him. The opposition and the government blame each other for the overnight violence.

Voters queued in some rural areas and districts of Bujumbura that are strongholds of Nkurunziza supporters. But there were only trickles of voters in other parts of the capital.

Opponents of the president have boycotted the poll, accusing Nkurunziza of violating the constitution by seeking another five years in office. Burundi's electoral commission said opposition names were still on the ballots and any votes for them would be counted.

There have been reports of voters cleaning their hands after having voted at polling stations near military camps. "Police and army officers went to vote but some, when they finished voting, tried to take the indelible ink off their fingers to hide the fact that they participated. It's an election when people are not proud of voting," a man from Bujumbura said.

Nkurunziza, almost sure to win given the opposition boycott, cycled to a polling station in his home village of Buye and queued to cast his vote.

Before riding off, he told reporters the election was to "allow the Burundian people to vote or to choose someone they believe in".

Although the result is hardly in doubt, it could be several days before the official announcement. The US State Department said elections held in these conditions "will not be credible and will further discredit the government".