President Ismael Omar Guelleh sent his condolences to the family on Monday and said that the small Horn of Africa country had lost "a statesman with great qualities who always knew how to battle for his convictions".
Ahmed Dini, who became Djibouti's first prime minister on independence from France in 1977, died in a military hospital on Sunday after a long illness and was buried the same evening, his cousin Ibrahim Chehem told AFP.
A member of the Afar community in a nation which still hosts a strategic French military base and was once known as the French Territory of the Afars and the Issas, Ahmed Dini resigned after six months in office after falling out with president Hassan Gouled Aptidon.
In the early 1990s, he joined the Afar rebel Front for the Restoration of Unity and Democracy (FRUD) and became leader of the movement which fought a desert war against Issa domination which emerged soon after independence.
Last rebel leader to lay down arms
By 1992, the government had lost control of northern towns to the FRUD, which it described as a foreign-backed invasion force because of regional ethnic ties. Divided for 10 years between war and exile, Ahmed Dini was the last rebel leader to lay down his arms, in May 2001.
Omar Guelleh, who came to power in a 1999 election after a return to the multiparty system scrapped after independence, said Monday in a statement that "in the name of the nation and my personal name, I would like to express my saddest condolences to the family of Ahmed Dini.
"Djibouti's people lose ... a freedom fighter, a statesman with great qualities who always knew how to battle for his convictions and opinions."
Ahmed Dini had led the opposition during Djibouti's first multiparty general election in January 2003. The opposition did not win a single seat in that poll and subsequently denounced electoral fraud.
Ibrahim Chehem said Ahmed Dini had "open heart surgery two and a half years ago. He was diabetic. His health deteriorated over the past year."
Ahmed Dini's death came less than a year before the next presidential election in Djibouti is due to be held, when Guelleh is entitled to stand for a second mandate.