The national electoral commission said Sata had won 43 percent of the vote to Banda's 36 percent, with 143 of the country's 150 constituencies reporting.
The number of registered voters in the remaining seven constituencies was smaller than the more than 188,000 votes separating the two rivals, the commission said.
"I therefore declare Michael Chilufya Sata to be duly elected as President of the Republic of Zambia," said Chief Justice Ernest Sakala to a burst of cheers from Sata's supporters in the election results centre.

