Key dates in the post-independence history of Zambia, which goes to the polls on Thursday after a tense presidential election campaign:

The country known under British colonial 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 the first president.

Supporters of Frederick Chiluba cheer his presidential inauguration in 1991, the first of two terms he would serve as Zambia's president
Supporters of Frederick Chiluba cheer his presidential inauguration in 1991, the first of two terms he would serve as Zambia's president AFP / Walter DHLADHLA

He rules for 27 years under a single-party system and hosts many who struggle against repressive and colonial regimes including South Africa's ANC and Zimbabwean exiles such as Robert Mugabe.

Widespread hunger in the 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.

Kenneth Kaunda, dubbed 'Africa's Ghandi' and Zambia's first president ruling for 27 years, died in June
Kenneth Kaunda, dubbed 'Africa's Ghandi' and Zambia's first president ruling for 27 years, died in June LEHTIKUVA / -

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.

Zambia's President Edward Lungu is running for a contested second term in August
Zambia's President Edward Lungu is running for a contested second term in August AFP / Gianluigi Guercia

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 fraud accusations. 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.

Charismatic 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 opposition arguments that he will by then have already served two terms.

In June, Amnesty International warns that repression under Lungu has pushed Zambia to the edge, pointing to the last five years of "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.