Lusaka - Zambia's president has been re-elected in a closely contested vote, the country's electoral commission announced Monday.The commission said President Edgar Lungu of the ruling Patriotic Front party had received 1 860 877 votes, while closest challenger Hakainde Hichilema of the opposition United Party for National Development received 1 760 347.For the first time, the winner needed over 50% of the votes to avoid a runoff election.The vote-counting process after Thursday's election took days and has prompted opposition allegations of irregularities. Election observers have urged calm.The election followed a tense campaign marred by street clashes, though voting day was mostly peaceful. Lungu, who took office in January 2015 after the death of President Michael Sata, won a tight election over Hichilema last year.Zambia's record of peaceful transitions of power had been held up as a democratic model in Africa. International observers have urged Zambians to direct any complaints about the election process to the courts, rather than taking to the streets."In this tense and competitive climate it is essential that the security forces respect the constitution and remain impartial and professional in the discharge of their duties," said Kofi Annan, the former UN secretary-general.The Carter Center, the human rights organisation founded by former US President Jimmy Carter, said the weeks ahead will test Zambia's democratic institutions."The country still faces significant challenges as its nascent dispute-resolution processes will surely be tested for the first time," the center said in a statement.