Key dates in the post-independence history of Zambia, which goes to the polls August 12 after a violent presidential election campaign:
The country known under British rule as Northern Rhodesia becomes an independent state within the Commonwealth on October 24, 1964.
Kenneth Kaunda, leader of the main nationalist party and nicknamed "Africa's Gandhi" for his non-violent activism, becomes its first president.
He rules for 27 years under a single-party system, during which time he hosts many who struggled against repressive and colonial regimes including South Africa's ANC and Zimbabwean exiles including Robert Mugabe.
Widespread hunger in the country's northern copper belt region in 1986 sparks riots, and the following year Zambia breaks off ties with the International Monetary Fund.
In 1989, in dire economic straits, it adopts austerity measures. A year later riots again fuelled by economic hardship claim 45 lives.
First multi-party elections
Multi-party democracy is adopted in 1990 after a referendum.
A year later Frederick Chiluba and his Movement for Multiparty Democracy (MMD) win the first multi-party elections, marking the end of Kaunda's rule.
Chiluba launches a privatisation programme, which concerns 250 state firms.
In a contested election in 1996 he wins a new mandate after barring Kaunda from returning via a constitutional amendment.
Under popular pressure in 2001, Chiluba says he will not stand in the next presidential election, having failed to change the constitution in a bid for a third term.
In 2002 Chiluba's chosen successor Levy Mwanawasa is inaugurated after narrowly winning in a vote marred by accusations of fraud. He wins a second mandate in 2006, but dies two years later.
Vice President Rupiah Banda steps in and wins a close race against Michael Sata of the Patriotic Front (PF), who goes on to win the next election in 2011, tainted by sporadic violence in Lusaka and mining towns.
Sata, dubbed "King Cobra", is accused of abuses by the opposition, while former supporters say he reneged on his promises.
Sata dies in 2014, and in January 2015 interim leader Edgar Lungu of the PF is sworn in, pledging to unite the country and rebuild the economy.
In August 2016 Lungu narrowly wins the presidency against main rival Hakainde Hichilema of the United Party for National Development (UPND) after a violent campaign that saw clashes between the top two parties.
A month later the constitutional court throws out Hichilema's fraud claim and Lungu is confirmed president.
It later rules that Lungu can run for a second term in August's election, dismissing the opposition's arguments that Lungu will by then have already served two terms.
In June Amnesty International warns that repression under Lungu has pushed Zambia to the edge of a "human rights crisis".
The organisation points in the last five years to "an increasingly brutal crackdown on human rights, characterised by brazen attacks on any form of dissent".
On August 1 Lungu orders the deployment of the military to quell violence ahead of the elections.
In several parts of the country, supporters of the ruling PF and the UPND opposition clash armed with machetes, axes and slingshots.