Something funny happened the day before Azerbaijan's presidential election: The election commission announced the winner.

On Tuesday, a day before the voting began, the smartphone app of the Central Election Commission released results showing President Ilham Aliyev, whose family has been at the helm of the Caspian Sea nation for four decades, winning 73 per cent of the vote.

On Wednesday, the commission said Aliyev had won 85 per cent of the vote. His closest contender, Jamil Hasanli, trailed with six per cent, it said.

The commission apologized for the early result on Thursday, saying it was only a test at one polling station conducted by the software developer. It expressed "deep regret" for the "misunderstanding."

International monitors said Thursday that the vote that kept the dynasty in power was marred by violations.