Partial and regional tallies start to trickle in on Friday, with final consolidated results expected by Sunday, although President Edgar Lungu's party hints it is heading for victory.
Vote counting has been under way in Zambia after a hard-fought general election that saw sporadic clashes and troop reinforcements dispatched to three provinces.
The ballot is expected to be the tightest yet in the third successive standoff between President Edgar Lungu, 64, and veteran opposition candidate Hakainde Hichilema, 59.
Thursday's vote presented a test of democracy in the usually peaceful southern African nation country of more than 17 million people.
Rising living costs appear to have sapped support for Lungu, who is accused of growing increasingly iron-fisted since taking office in 2015.
Hichilema is vying for the top job for the sixth time, this time with the backing of 10 opposition parties.
Violence occurred in North-Western province, a Hichilema stronghold, where two people including a chairman of the ruling ruling Patriotic Front (PF) party were killed, Lungu announced late Thursday.
He blamed Hichilema's United Party for National Development (UPND).
Zambia's electoral commission has launched an investigation into the chairman's murder.
The UPND distanced itself from the case, calling it a "distraction" tactic.
The PF also alleges some of its agents were beaten and chased from polling stations in Southern province.
I’m also appalled by the amount of mayhem witnessed in North-Western, some parts of Westen, and Southern provinces. Clearly, the elections in these places have not been free and fair.— Edgar Chagwa Lungu (@EdgarCLungu) August 12, 2021
PF party says in lead
Lungu, who had deployed the military following pre-election clashes, reinforced troops in those two provinces and in Western province.
He has already inferred that election-day violence "effectively rendered the elections in ... three provinces not free and fair".
Despite this warning, PF chief Davies Mwila said the party's own calculation of votes cast in various polling stations "show that President Edgar Lungu is in the lead."
"We are confident that we shall carry the day," he said.
Nic Cheeseman, a British political scientist, tweeted on Friday that there were fears Lungu was "exaggerating the extent of violence and instability in opposition regions" in order to justify invalidating results there.
Social media access has been restricted since Hichilema cast his vote in Lusaka, raising eyebrows among the electorate.
Most shops were shut in the capital on Friday where a burning tyre barricade was seen along a highway.
Good morning Zambia! Data coming in is very positive and the will of the people is clear. But be alert - when an outgoing regime panics, it can resort to desperate measures. So stay calm and focused. We will protect our vote with peace and love in our hearts. Change is HERE. pic.twitter.com/oM9qXubqPS— Hakainde Hichilema (@HHichilema) August 13, 2021
Parliamentary and local government elections took place at the same time as the presidential ballot.
But long queues meant that voting continued long after the official closing time of 1600 GMT (6pm local) — in some cases, the last ballot was cast nine hours afterwards.
More than seven million people were registered to vote.
The outcome is expected to hinge on results in Lusaka, a bustling city of more than 3.3 million, and in the central Copperbelt province — key to the economy in Africa's second-largest copper producer.
Hichilema, who is running against Lungu for the third time, only lost by around 100,000 votes in 2016 and an even narrower margin in a by-election the previous year.
Poll watchers have warned of possible unrest when the results are out.
"The real test will be in the counting process" and whether Lungu will accept a possible eventual defeat, said independent Zambian political economist Trevor Simumba.
Although violence has flared in past elections, all of Zambia's transitions of power have been peaceful since the adoption of multi-party democracy in 1990.