Cameroon's President Paul Biya, the world's oldest serving ruler, secured an eighth term in office on Monday, vote results showed, as the main opposition challenger who has also claimed victory reported gunfire near his home.
Biya, 92, won 53.66 per cent of the vote, against 35.19 per cent for his former ally, Issa Tchiroma Bakary, the Constitutional Council said.
A new seven-year term could keep the veteran leader in power until he is nearly 100.
Opposition protesters have clashed with security forces repeatedly over the past week after partial results suggested Biya was on course to win the October 12 vote.
There was no immediate comment on the result from the government, which has rejected opposition accusations of irregularities.
After the results were announced, Tchiroma wrote on Facebook that two people were killed after shots were fired at civilians outside his home in the northern city of Garoua.
He did not say who had fired the shots or comment directly on the election result. Reuters could not confirm his account independently.
Last week he said he had won the election and would not accept any other result.
Sporadic protests erupted in several towns across the country after the result was announced.
In Garoua, angry protesters guarding Tchiroma's home said they targeted a house sheltering snipers firing at supporters, bursting a water tank.
Streets were largely deserted in the capital Yaounde and most businesses closed, with anti-riot police deployed across the city.
Reuters reporters witnessed clashes between opposition supporters and security forces in Douala, where police fired tear gas as protesters protected their faces with masks or clothing.
Tchiroma supporters erected barricades, piled debris on the road and burned tires, darkening the sky.
"We all know that the majority of Cameroon's people voted for Issa Tchiroma Bakary," said one protester in Douala. "It is inadmissible that President Paul Biya won in certain war zones."
The result raised the prospect of more confrontations between opposition supporters and security forces, a day after at least four people died in clashes in Cameroon's commercial capital Douala.
"We expect unrest to escalate as Cameroonians widely reject the official result, and we cannot see the Biya government lasting much longer," said Francois Conradie, lead political economist at Oxford Economics.
"Biya now has a notably shaky mandate given many of his own citizens don’t believe he won the election," Murithi Mutiga, Africa Programme Director at the International Crisis Group, told Reuters.
"We call on Biya to urgently initiate a national mediation to prevent further escalation," Mutiga added.
Biya, 92, took office in 1982 and has held a tight grip on power ever since, doing away with the presidential term limit in 2008 and winning re-election by comfortable margins.
"Hereby declared elected President of the Republic, having obtained the majority of the votes cast, the candidate, Biya, Paul," Clement Atangana, president of the Constitutional Council, said.
Tchiroma is a former government spokesperson and employment minister in his late 70s who broke ranks with Biya earlier this year.
He mounted a campaign that drew large crowds and endorsements from a coalition of opposition parties and civic groups.

Fire in rebel-held east Congo kills 24 schoolchildren
Trump touts $5,000 payout if Republicans win as Vance waits in wings
Search expands after Philippine ferry fire kills five and leaves dozens missing
Trump says Iran war to end after US midterm elections
At least 20 killed in cargo vessel fire at China shipyard, state media reports
US military says it struck vessel in Caribbean, killing 3
At least 14 killed in explosion at weapons depot in Syria
US hits five Iranian oil tankers after attack on Navy ships
