Former Tanzanian president Benjamin Mkapa, hailed as a peacemaker in East Africa, has died aged 81 in a Dar es Salaam hospital, the government announced on Friday.
He was the country's third president after independence from Britain in 1962 and ruled for two terms from 1995 to 2005.
"I'm saddened by the death of the third president of Tanzania and that is a big loss for us as a country. Let's pray for him and more information will follow later," President John Magufuli said in a short televised speech.
He did not reveal the cause of death.
Mkapa was born in 1938 to a poor family in southeastern Mtwara.
He earned a degree in English in Uganda and later worked as a journalist before being appointed the press secretary for the country's first president, Julius Nyerere.
He held several cabinet posts, such as foreign minister and information minister, and also served as ambassador to the United States before he was elected president.
His presidency was marked by economic reform, including the privatisation of state enterprises and liberalisation of the economy.
He also secured $3 billion (2.5 billion euros) in debt relief and economic growth soared during his tenure while inflation dropped.
In his memoir published last year, Mkapa said the shooting to death of some 30 opposition supporters in post-election riots on the semi-autonomous island of Zanzibar in 2001 was one of the "black spots" of his stint in power.
After leaving office he remained active, taking part in mediation talks in Kenya after 2007-2008 election violence.
African Union chief Moussa Faki Mahamat on Twitter hailed him as "a statesman particularly remembered as an indefatigable peacemaker in the East African region."
Mkapa had most recently attempted to mediate between Burundi's government and opposition groups after a disputed 2015 election plunged the country into crisis. However the government repeatedly refused to take part and the talks went nowhere.
Burundi's new president, Evariste Ndayishimiye, on Twitter said he was "deeply saddened" by Mkapa's death.
"The people of Kenya have lost a close friend and brother, who stood with Kenya during some of our darkest hours," said President Uhuru Kenyatta, announcing a three-day period of mourning in the neighbouring country.
Kenya's veteran opposition leader, Raila Odinga, said Africa "has lost a giant".
Rwanda's Paul Kagame said "he was a great Pan-Africanist whose contribution went well beyond Tanzania."
Tanzania will observe seven days' mourning, during which the national flag will be flown at half mast.
Mkapa will be buried in his home village on 29 July, Prime Minister Kassim Majaliwa said in a televised briefing.