Zambia's president has been re-elected in a closely contested vote, the country's electoral commission announced Monday.