Zambia's electoral commission has confirmed that last week's presidential election was won by the opposition candidate Hakainde Hichilema.
Mr Hichilema defeated his main rival, the outgoing President Edgar Lungu, by more than a million votes.
It was Mr Hichilema's sixth attempt at winning the presidency. His supporters have been celebrating on the streets of the capital, Lusaka.
Earlier, Mr Lungu alleged that the elections were not free and fair.
He said election officials from his Patriotic Front party had been chased from polling stations, leaving votes unprotected.
In response, Mr Hichilema's United Party for National Development said the statement was the "desperate final act of an outgoing administration".