Zambia's incumbent President Edgar Lungu has been declared the winner of a closely fought presidential election, but the result was immediately challenged by his main opponent Hakainde Hichilema.

Lungu, leader of the Patriotic Front (PF), won 50.35 percent of Thursday's vote, against 47.67 percent for Hichilema, of the United Party for National Development (UPND), the Electoral Commission of Zambia said on Monday.

The opposition party quickly, however, rejected the result, claiming the electoral commission had colluded to rig the vote against its candidate.

"We have evidence to the effect that the votes for Hakainde Hichilema have been deliberately reduced in collusion with the Electoral Commission of Zambia," the UPND's lawyer, Jack Mwiimbu, told journalists.

"We have confidence that the constitutional court will rise above board and declare the results a nullity," he said.

Police said officers were sent to quell rioting by Hichilema's supporters in the south of the country who blocked roads and burned tyres after the result was announced. Southern province police commissioner Goldwin Phiri reported clashes with police in the towns of Monze, Chombe and Mazabuka.

"We don't know where we are headed, but ... there will be trouble," a civil servant in Mazabuka told DPA news agency.

Al Jazeera's Tania Page, reporting from the capital, Lusaka, said Hichilema "has really been able to cast a lot of doubt over the process", raising many complaints about the campaign period and vote-counting process.

"Some of that has been supported by international observer missions," Page said.

"Most particularly, the European Union, which agreed with his claims that the state media is heavily biased towards the government."

The EU also supported Hichilema's view that police had acted with political motives at times, and had also cracked down "quite harshly" on some of his political gatherings, our correspondent said.

The election was fought around the issues of rising unemployment, mine closures, power shortages and soaring food prices which Hichilema, an economist and businessman, blamed on Lungu's mismanagement.

Lungu has been in office for just 19 months after he first took power last year when he beat Hichilema by fewer than 28,000 votes in a snap election following the death in office of president Michael Sata.

His re-election will see him remain in power for another five-year term.

Hundreds of Lungu's supporters, most of them young men draped in PF regalia, took to the streets of Lusaka, chanting slogans and singing, while drivers hooted their car horns in celebration.

Emanuel Phiri, 48, a taxi driver, said he believed Lungu was the popular choice of the Zambian people.

"Lungu really worked hard for this and God has made it possible," he told Al Jazeera.

The opposition, however, has launched a challenge to the result and will appear in court later in the week, Al Jazeera's Page said.

"We are going to petition this election in court. It was full of irregularities, malpractices and vote stealing," said Brian Mwiinga, spokesperson for Hichilema's UPND.

"The narrow margin that the electoral commission claims Lungu won by is not legitimate and because it is such a small percentage it shows that it does not reflect the will of the people; instead it simply tells us the story that the election was stolen," he told Al Jazeera.

Chris Akufuna, a spokesperson for the Electoral Commission of Zambia, declined to comment on the disputed result, but urged aggrieved parties to submit complaints in writing.

Gilles Kasongo, of the Zambia Election Information Centre, a coalition of civil society organisations focusing on governance and electoral procedure, said that several flaws in the election process made it difficult to accept that it was a fair victory.

"There are strong concerns in the electoral commission's handling of matters concerning results, and these should be taken up in the courts by political parties," Kasongo told Al Jazeera, adding that the use of public funds to finance the ruling party's campaign means the victory "cannot be seen as a just win".

Additional reporting by Tendai Marima in Lusaka. Follow Tendai on Twitter: @i_amten