Partial results from Botswana's elections started to trickle in on Thursday, a day after a ballot seen as the first real political test for a country ruled by the same party since independence.
Pre-election polling showed the Botswana Democratic Party (BDP), battered by an unprecedented internal crisis and new political rivals, would win the vote but return to parliament with a reduced majority.
The BDP, which has ruled since Botswana became independent from Britain in 1966, suffered a seismic jolt in May when former president Ian Khama renounced his hand-picked successor, Mokgweetsi Masisi.
Khama stormed out after accusing his former deputy of autocracy and threw his weight behind the Umbrella for Democratic Change (UDC), once his fiercest critic.
He then endorsed a new political party, the Botswana Patriotic Front (BPF), which has fielded candidates in only 19 of the 57 constituencies.
After casting his ballot in his home village of Moshupa, 65 kilometres (40 miles) west of Gaborone on Wednesday, Masisi admitted that this was "the toughest election we have had to fight."
Botswana is seen across Africa as a beacon of continuity and democracy.
Should the BDP lose the vote, it would be the first time Botswana, a country famed for its diamonds and wildlife, has seen a change of government in 53 years.
Ballot papers from the 2,200 polling stations are being counted by hand at regional district centres across the country.
The winner will be declared once a party reaches 29 parliamentary seats -- the minimum requirement to form a government.
Results trickled in from about a dozen constituencies, which posted on the government's Facebook page by mid-afternoon -- still too few to give any indication of the outcome.
Botswana's Independent Electoral Commission (IEC) said the next president would be announced by the chief justice as soon as a party hits the 50 percent threshold.
"But that does not mean counting will stop, the counting will continue until we have the last result released," IEC spokesman Osupile Maroba told reporters.
He said a higher number of results could be released within the next few hours, hinting that the winner could be announced by the end of the day.
Polling generally proceeded smoothly across the vast, sparsely populated country of 2.2 million people, according to the electoral commission, despite delays in clearing voters at some polling stations.
But the UDC, which poses the first and greatest challenge so far to BDP dominance, issued a statement overnight charging that the voting was flawed.
"It appears that our greatest fears have become a reality, that (these) elections will not be fair," it said.
The UDC, which won 17 out of the 57 seats in the last election five years ago, said it had received complaints "about widespread election irregularities", including "unnecessary delays" at various polling stations across the country.
But the electoral commission said it had yet to receive any complaints about the voting.
Complainants have 30 days to lodge petitions after results are declared and the chief justice has named the leader of the winning party, the state president.
"The law is there for everyone to (seek) redress where necessary and the process will be allowed to take its course to the conclusion of the matter," said Maroba.
If none of the parties attain the minimum 29 seats, a hung parliament convenes and the newly-elected lawmakers vote for a president.