Acting president Rupiah Banda was announced the winner of Zambia's presidential by-election on Sunday, snatching victory from the jaws of opposition leader Michael Sata amid accusations from the opposition of vote-rigging.

Banda, 71-year-old candidate of the ruling Movement for Multi-Party Democracy, took 40.09 percent of the vote to Sata's 38.13 percent in Thursday's election, Electoral Commission of Zambia Chairperson Florence Mumba announced.

Voter turnout out was 45 percent, or nearly 1.8-million people, out of a registered 3.9-million voters, she added.

Witnesses said preparations were under way in Lusaka quickly to swear Banda in as president for the next three years, completing the term of ex-leader Levy Mwanawasa, who died in August after a stroke.

Sata has accused the ZEC of rigging in Banda's favour and indicated he will go to court to demand a recount.

"We will not recognize Mr Banda"

"We will not recognize Mr Banda unless a court tells us why we should," a spokesperson for Sata's Patriotic Front, Given Lubinda, said.

Sata has complained of numerous alleged irregularities during the vote. Among other things, he claims voting continued in some places while the first results were being announced, South African radio reported.

African observers gave the election a clean bill of health.

South African radio reported that sporadic rioting took place overnight in some poor neighbourhoods of Lusaka after news of Sata's electoral setback trickled through. Lusaka is a Sata stronghold. Banda is more popular in rural areas.

In the only confirmed incident of what looked like a fraud attempt, an election officer in a Lusaka constituency was found in possession of an envelope of ballots pre-marked for Banda on election day. The man was detained by police.

Sata, who was on his third attempt to become president, had looked comfortably ahead at one point, while the rural votes were still being counted.

Army on alert

The Zambian army has been on alert since earlier this week, amid fears of violence in the event of a disputed outcome.

In 2006, Sata's initial refusal to accept his defeat at the hands of Mwanawasa sparked days of rioting.

Zambia is Africa's largest copper producer but 65 percent of the population live on less than a dollar a day.

The global financial crisis loomed large over the election, as fears of a worldwide recession drag down prices for the commodity.

Banda has promised to continue Mwanawasa's legacy of prudent economic management, while cutting taxes on food and fuel.

Motlanthe in Zambia

President Kgalema Motlanthe will attend the Banda inauguration on Sunday.

Spokesperson Ronnie Mamoepa said Motlanthe and Foreign Minister Nkosazana Dlamini-Zuma had arrived in Lusaka on Sunday afternoon. Motlanthe was expected to convey the congratulations of the government and people of South Africa to Banda.

The two return to South Africa later on Sunday.

Sapa