The BBC’s Ahmed Said Egeh in Djibouti city said voting was peaceful and had to be extended by one hour because of the large turnout.
President Ismael Omar Guelleh, whose party held all 65 seats in the last parliament, said it was a “milestone for the democratisation” of Djibouti.
The country is home to the biggest French and US military bases in Africa.
Its port is also used by foreign navies patrolling busy shipping lanes in the Gulf of Aden to fight piracy.
Mr Guelleh’s family has governed the Red Sea city state, which has a population of about 906,000 people, since independence from France in 1977.
Our reporter said the opposition bloc was able to campaign unhindered and drew large crowds at its rallies where there were calls for a fairer society and more accountability.
It is also the first time in 10 years that the opposition had access to the state-controlled media.
The new coalition decided to end its election boycott after it was agreed in November that 20% of parliamentary seats would be selected by proportional representation.
The elections come two years after President Guelleh was re-elected to serve a controversial third term.
Djibouti rulers claim poll victory
Djibouti – The ruling party in the tiny Horn of Africa nation of Djibouti said on Saturday it had won a parliamentary election based on preliminary results, as the opposition denounced what it called widespread fraud during voting.
The ruling Union for the Presidential Majority (UMP) party “received 49.39% of the votes against 47.61% for the opposition” in the capital, home to three-quarters of the population, Interior Minister Hassan Darar Houffaneh told reporters.
A spokesperson for the opposition branded the results “a joke” and denounced what he called “massive fraud” during Friday’s ballot.