The ruling party in the strategic Horn of Africa nation of Djibouti said Saturday it had won a parliamentary election the opposition alleged was marred by widespread fraud.
Djibouti hosts the biggest French and United States military bases in Africa and guards the southern entry to the Red Sea and route to the Suez Canal.
Interior Minister Hassan Darar Houffaneh said the ruling Union for the Presidential Majority (UMP) party secured 49.39 percent of votes against 47.61 percent for the opposition in the capital, home to three-quarters of the population.
The ruling party was also ahead in the other voting districts, he said.
The UMP is the party of President Ismael Omar Guelleh and held all 65 seats in the last parliament.
Friday's elections saw various opposition parties unite behind a common programme focusing on human rights, developing independent media and fighting against "tribalism, corruption and nepotism."
The alliance, the Union for National Salvation (USN), is also reported to have the backing of the local chapter of the Muslim Brotherhood.
A USN spokesman said the official results from Friday's election were a "joke".
"The UMP is conducting massive fraud as usual. This is a joke," Daher Ahmed Farah told reporters.
Djibouti escaped the wave of protests that swept away governments in several Arab countries over the past two years.
But it was rocked by a single day of unprecedented anti-government protests and violent clashes in February 2011.
An AFP journalist said the streets of the capital were calm Saturday morning.
In a ceremony, UMP coalition head Abdoulkader Kamil congratulated "all those who supported" the ruling party.
But the opposition published the results of their own local vote tallies on social networks, asking followers to "compare them with the results" given by state-run television.
On Friday, the opposition accused the ruling party of extending the opening hours of the polling stations by one hour, saying it was a means to "accelerate the cramming of ballots."
It also claimed USN delegates had been expelled from several venues and that members of the Republican Guard, an army unit responsible for presidential security, cast multiple votes.
The allegations could not be independently verified from other sources and no government official was contacted in Djibouti.
Sixty-five-year-old Guelleh -- only the second president since independence from France in 1977 -- was re-elected for a third five-year term in April 2011 after the constitution was revised to allow him another term in office.
Djibouti derives most of its revenue from its port and from land rented out for the Western military bases.