Djibouti's incumbent leader, Ismail Omar Guelleh, has won presidential elections boycotted by the opposition and in which he was the sole candidate.
Ismail Omar Guelleh says he will not stand in another election
The high turnout - 78.9% - was the only unpredictable element in the polls.
Mr Guelleh, who won 100% of the ballots cast, told France's Le Figaro newspaper he regretted "having no opponent".
Earlier on Friday, police fired tear gas to disperse hundreds of protesters rallying against the elections who had set up a roadblock with burning tyres.
During his campaign, Mr Guelleh pledged to reduce poverty and the country's dependence on food imports while boosting women's rights and transparency in the public administration.
"I accuse the opposition of not having the courage to give voters the right to choose between several candidates," the French paper quoted him as saying.
But the opposition has vowed not to accept his re-election.
"We would rather die standing than follow on our knees," a banner read.
"It is meaningless to vote," Ali Guedda Boulsa told the AFP news agency before Mr Guelleh's victory was announced. "Our votes are never considered."
Djibouti hosts both US and French military bases
After casting his ballot, Mr Guelleh said the opposition "were afraid to engage in the battle."
He campaigned vigorously with most rallies held in the evening when the scorching afternoon temperatures of up to 45C had cooled.
He has been in power since winning elections in 1999 but says he will not stand again.
The only challenger withdrew last month citing a lack of funds.
A diplomat told the BBC's Mohammed Adow in Djibouti that, with the outcome not in doubt, the process itself would be closely watched.
The opposition accused the ruling coalition of rigging 2003 parliamentary elections in which it won all 65 seats.
Earlier this year, the US criticised Djibouti's human rights record as "poor".
This criticism came despite Djibouti hosting the only US military base in Africa which Washington uses for its fight against terror in the region.
Djibouti, strategically placed on the Red Sea, also has the largest French military base in Africa.