President Edgar Lungu deployed more troops in parts of the country to quell election violence after Zambians flocked to vote on Thursday in tightly contested polls pitting him against long-time rival Hakainde Hichilema, as the internet saw partial restrictions.

After 12 hours of voting, polling stations started closing at 6 pm (1600 GMT), though several hundreds still in queues were being allowed to cast their ballots.

Around seven million citizens are registered to vote for a president, legislators and local government representatives
Around seven million citizens are registered to vote for a president, legislators and local government representatives AFP / Patrick Meinhardt

The presidential election is seen as a test of the country's democratic credentials after a campaign dominated by economic woes and the deployment of soldiers following clashes between Lungu and Hichilema's supporters in the runup to voting.

On Thursday, Lungu said election-day violence had killed two people -- including the chairman of his party in North-Western province.

Zambia's ruling party, the Patriotic Front, holds a virtual rally in the capital Lusaka, attended in person by select supporters
Zambia's ruling party, the Patriotic Front, holds a virtual rally in the capital Lusaka, attended in person by select supporters AFPTV / Maryke VERMAAK

In a statement, he said he had directed the army commander "to quickly re-enforce security in North-Western, some parts of Western, and Southern provinces where this unprecedented violence is taking place".

Tensions have flared in the run-up to polling in this southern African country of 17 million people.
Tensions have flared in the run-up to polling in this southern African country of 17 million people. AFP / Patrick Meinhardt

"I will not take kindly to these evil schemes," he vowed. "How can you talk about free and fair elections when our opponents have taken this election as war?" he said.

The troop deployment was just a "distraction", opposition United Party for National Development spokesman Anthony Bwalya told AFP.

Queues of hundreds of people formed before dawn in front of voting stations in Lusaka
Queues of hundreds of people formed before dawn in front of voting stations in Lusaka AFP / Patrick Meinhardt

Sixteen candidates were vying for the top job, but the frontrunners are Lungu, 64, and business tycoon Hichilema, who are facing off at the polls for the third time and who between the two of them garnered almost 98 percent of the votes in the 2016 election.

It is Hichilema'a sixth attempt at the presidency.

Hichilema, 59, who is running for a sixth time, is backed by an alliance of 10 parties.
Hichilema, 59, who is running for a sixth time, is backed by an alliance of 10 parties. AFP / Patrick Meinhardt

"We are confident that we will carry the day," he said after voting at a secondary school in a leafy suburb of Lusaka. "People want change -- you can see it in their faces," he told reporters.

Addressing opposition fears of fraud, Hichilema said Zambia's next leader "must be determined by the... voters, not the people who count the votes".

IMAGES Polls open in Zambia's tense economy-dominated election. All together, 16 candidates are vying for the top job, but the frontrunners are the incumbent Edgar Lungu and his nemesis, business tycoon Hakainde Hichilema, who between them garnered 97.9 p
IMAGES Polls open in Zambia's tense economy-dominated election. All together, 16 candidates are vying for the top job, but the frontrunners are the incumbent Edgar Lungu and his nemesis, business tycoon Hakainde Hichilema, who between them garnered 97.9 percent of the ballots cast in the last election. AFPTV / Maryke VERMAAK

But by afternoon the internet was partially shut down in the capital Lusaka.

"Social media and messaging platforms including Twitter, Facebook, Instagram and Messenger are now restricted," said global observatory NetBlocks.

Student Edward Musayani, 26, who had been queueing for four hours to vote in Chawama township, said he checked his phone in the early afternoon and found that WhatsApp and Facebook had been switched off.

Map of Zambia, which holds presidential elections on August 12.
Map of Zambia, which holds presidential elections on August 12. AFP / STAFF

"That's quite unfortunate in a democratic dispensation like ours. People should have access to information to make informed decisions," he said.

"You are shutting down the voice of people and this will impact... how people view the election," he said.

The government had threatened to cut off internet access if people peddled "falsehoods that could destabilise" the election.

After voting earlier Lungu exuded confidence that he would retain the job he has held for the past six years in the copper-rich southern African country.

"We are winning,... I wouldn't have been in the race if we were not winning," Lungu said after voting in Chawama, a working class surburb.

The vote "is a test of democracy in Zambia, it is a test ultimately of how fair and freely (the voting takes place)," said political economist Trevor Simumba, adding that the "real test will be in the counting process."

A flagging economy and rising living costs have eroded Lungu's support base in recent years, surveys suggest.

Lungu is accused of borrowing unsustainably, particularly from Chinese creditors, to finance a spree of infrastructure projects.

Under his administration, Zambia became the first African country to default on its sovereign debt since the coronavirus pandemic began, while inflation soared to more than 20 percent.

Lungu's critics point to poverty and joblessness in the midst of glittering infrastructure.

Around seven million citizens were eligible to vote for a president, legislators and local government representatives.

The winning candidate must acquire more than 50 percent of votes to avoid a second-round runoff.

Official results were expected by Sunday.