President Ismail Omar Guelleh thanks his supporters after he was declared the winner with almost 99 percent of the vote.
At least three people died after a rare outbreak of intercommunal violence in Djibouti during which the police intervened, the public prosecutor said.
Fighting broke out on Sunday in several parts of the capital Djibouti, between the ethnic Afar group, which straddles Djibouti’s borders with Ethiopia and Eritrea, and the Issa, Djibouti’s other main ethnic group.
“There were several extremely serious criminal acts. Houses were intentionally set on fire,” Lamisse Mohamed Said told public television on Monday, without giving any possible reason for the violence.
“Innocent people were gratuitously attacked,” she said.
Three people had died, she added, without specifying whether they had done so during the intercommunal fighting or after police intervened.
Interior Minister Said Nouh Hassan, in a televised speech broadcast overnight, referred to “events of a new magnitude” which he described as “intolerable”.
The AFP news agency reported that local residents spoke of a dozen killed, one saying a baker had been “lynched by Afar youths”.
Witnesses told AFP that the violence began in the Warabaley district, where Issa homes were torched, then spread to other areas.
Daher, a local entrepreneur, said he saw his Afar neighbours flee their home, fearing it would be set alight.
Calm had largely been restored on Monday, with a major police presence remaining in some areas of the capital, but internet connections were erratic and Facebook inaccessible.
Djibouti social media platforms have been extra busy for days following similar violence in neighbouring Ethiopia in late July.
Following the violence in Djibouti, several people were detained, the public prosecutor said.
“We are taking firm measures against those who sow these troubles and crimes in our country,” she said.
Flanked by Somalia and opposite Yemen, Djibouti has remained stable in a volatile neighbourhood. Djibouti’s stability has drawn foreign military powers, such as former colonial ruler France, the United States and China, to establish bases there.
But the country has also seen an erosion of press freedoms and a crackdown on dissent as it has courted foreign interest.
Djibouti’s gross domestic product (GDP) per capita income is about $3,500, higher than much of sub-Saharan Africa, but around 20 percent of the population live in extreme poverty and 26 percent are unemployed, according to the World Bank.