Zambia's founding president Kenneth Kaunda died on Thursday at the age of 97, the government announced.
Cabinet secretary Simon Miti said in an address on public television that Kaunda "died peacefully" at 2:30 pm (1230 GMT) at a military hospital where he had been admitted on Monday with pneumonia.
He declared 21 days of national mourning, in which flags will fly at half mast and ordered all forms of entertainment suspended.
President Edgar Lungu said he learnt of Kaunda's death with "great sadness".
"You have gone at a time we least expected," he 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) which 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).
Some nicknamed him "Africa's Gandhi" for his non-violent, independence-related activism in the 1960s.
But Kaunda's 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.
The landlocked southern African country has enjoyed relative stability since then.
In later life, Kaunda regained stature as an African statesman, helping to mediate crises in Zimbabwe and Kenya.