Lusaka - Rupiah Banda was hastily sworn in as president of Zambia on Sunday after snatching victory from the jaws of opposition leader Michael Sata amid accusations from the opposition of vote-rigging.

Banda, 71, of the ruling Movement for Multi-Party Democracy, will serve out the remaining three years in ex-leader Levy Mwanawasa's term after Mwanawasa's death of a stroke in August.

Zimbabwean President Robert Mugabe was among the dignitaries that attended Banda's swearing in at State House, a few hours after the Electoral Commission of Zambia (ECZ) announced he won Thursday's by-election with 40,09 percent of the vote to 38,13 percent for Patriotic Front leader Sata.

In his inauguration speech, Banda, a former vice-president under Mwanawasa, extended an olive branch to the PF, which has vowed to challenge the election result in court.

"United we stand, divided we fall," Banda said, calling on the opposition to put aside their "petty squabbles".

When it became apparent that Banda was going to win the vote, small-scale riots broke out Saturday in some poor neighbourhoods of Lusaka a Sata stronghold. Sata had been tipped to win the presidency in two of three opinion polls.

By Sunday, the riots had spread to the town of Kitwe in the Copperbelt mining region, where Sata is also popular. Radio Phoenix reported that police were engaged in running battles with Sata supporters. It was not clear how many protestors were involved.

Voter turnout in the election was down noticeably on the last presidential election at 45 percent of the registered 3,9-million voters, against a turnout of over 70 percent in 2006.

Sata has claimed numerous alleged irregularities during the vote. Among other things, he claimed voting continued in some places while the first results were being announced.

"We will not recognise Mr Banda unless a court tells us why we should," PF spokesperson Given Lubinda said.

Two African election observer teams, however, ave the election a clean bill of health. A pro-democracy NGO, the Foundation for Democratic Process, which carried out a parallel vote count said their numbers tallied with those of the ECZ.

In the only confirmed incident of what looked like a rigging 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 but that was before the votes from pro-Banda rural areas had come in.

The Zambian army has been on alert since earlier this week, amid fears of violence over 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.

"This will help Zambia to become a middle income country by 2030," he said."

He also warned foreign investors to respect Zambia's labour laws and to improve workers' wages. Sata had curried a lot of support by demanding better conditions for workers in Chinese-owned mining firms. - Sapa-dpa