- Kenneth Kaunda, popularly known as "KK" ruled Zambia for 27 years.
- He died in hospital on Thursday after being admitted in hospital with pneumonia.
- The late stateman has been described as "charismatic and selfless".
The Zambian government has declared 21 days of national mourning, with flags flying at half-mast following the death of former president Kenneth Kaunda on Thursday.
Cabinet secretary Simon Miti said in an address on public television said Kaunda "died peacefully" at 14:30 at a military hospital where he had been receiving treatment since Monday.
The government official said Kaunda had been admitted to hospital with pneumonia.
Miti said it was with "deep regret and sorrow" that President Edgar Lungu announced "the passing of our beloved founding father, icon and global statesman".
The government declared 21 days of national mourning, with flags flying at half-mast, and suspended all forms of entertainment.
"You have gone at a time we least expected," Lungu said on Facebook, describing him as a "true African icon."
Kaunda ruled Zambia for 27 years, taking the helm after the country gained independence from Britain in October 1964.
Popularly known by his initials KK, he was head of the main nationalist party, the left-of-centre United National Independence Party (UNIP) that led the country after British colonial rule.
While in power he hosted many of the movements fighting for independence or black equality in other countries around the region, including South Africa's African National Congress (ANC).
- 'Africa's Gandhi' -
Kaunda was nicknamed by some "Africa's Gandhi" for his non-violent, independence-related activism in the 1960s.
But his popularity at home waned as he became increasingly autocratic and banned all opposition parties.
He eventually ceded power in the first multi-party elections in 1991, losing to trade unionist Fredrick Chiluba.
Despite the change over of power between different political parties since Kaunda left office, the landlocked southern African country has enjoyed relative stability.
In later life, Kaunda regained stature as an African statesman, helping to mediate crises in Zimbabwe and Kenya.
News of his death started filtering through social media and by the time government officially announced it, sombre Zambians had been anxiously glued to television screens in public places.
- 'Charismatic, selfless' -
In a show of respect, the largest opposition party, the United Party for National Development (UPND), temporarily halted all election campaigning ahead of the August 12 vote.
"We urge all to remain peaceful and united as we continue to reflect on the life of... Kaunda, the immense sense of duty, service and sacrifice with which he led and served our country," the UPND said in a statement.
One of Kaunda's last major international public appearances was in December 2013 during Nelson Mandela's funeral. At the age of 89 even then, he jogged up to the podium to pay tribute.
"This is really a dark day for Zambia," a 50-year-old Lusaka resident Herbert Simbeye, who attended the same church as Kaunda, told AFP.
"At his 90th birthday, my son was one of the people who gave KK flowers at church".
"We will not forget Kaunda's contributions to the struggles against colonialism and apartheid," the Nelson Mandela Foundation said in a statement.
In neighbouring Botswana, President Mokgweetsi Masisi has declared seven days of mourning in honour of the "charismatic" and "selfless" Kaunda, whom he described as an "iconic statesman of the highest credentials".