The West African country is known for its stable democracy, but tensions rose over Monday's presidential and legislative vote after Mahama claimed to have won a parliamentary majority and warned Akufo-Addo against stealing the vote.
In the presidential race, Akufo-Addo received 51.59 percent of the vote, beating opposition leader and former president Mahama's 47.36 percent, the electoral commission said.
The announcement was greeted with chanting and dancing by a crowd of supporters in the seaside capital Accra.
"Now is the time, irrespective of political affiliations, to unite, join hands and stand shoulder to shoulder," the 76-year-old president told excited supporters honking vuvuzelas outside his Accra residence.
Observers viewed polling as generally free and fair but police said five people were killed and 19 injured in election-related violence.
The political climate soured late Tuesday when Mahama accused his rival of showing "credentials that are very undemocratic".
Mahama, 62, charged that Akufo-Addo had harnessed the military in a bid to sway the outcome, a claim the government said was false.
"You cannot use the military to try and overturn some of the results in constituencies that we have won. We will resist any attempts to subvert the sovereign will of the Ghanaian people," the former president said.
Mahama – who has twice before lost to Akufo-Addo by a narrow marginr, the last time in 2016 – has yet to comment on the results.
The full count of the 275 parliamentary seats has not been announced and are expected to be very close between Akufo-Addo's center-right New Patriotic Party (NPP) and Mahama's National Democratic Congress (NDC) party.