Results of a run-off in which a final constituency voted on Friday showed Mills had narrowly defeated Nana Akufo-Addo of the ruling New Patriotic Party (NPP).
Groups of NDC supporters drove motorbikes or cars round the streets of Accra cheering, many sporting flags, scarves or umbrellas in the party’s green, red, white and black colours.
The poll, one of the closest leadership elections in Africa, has raised tensions in the gold- and cocoa-exporting country whose political stability has attracted growing numbers of foreign investors as it prepares to produce oil in late 2010.
Legal challenges and accusations of violence and irregularities by both main parties had threatened to mar a vote seen as a chance to bolster Africa’s battered democratic credentials after flawed and bloody polls in Zimbabwe and Kenya.
International monitors say voting has been mostly peaceful.
Announcing the results at a news conference in the capital Accra, Electoral Commission Chairman Kwadwo Afari-Gyan said turnout in the run-off vote, which was held in most of the country on December 28, was 72.91 percent.
Mills won 50.23 percent of the votes against 49.77 percent for Akufo-Addo, whose party had no immediate comment.
Run-off voting in all but one of the West African country’s 230 constituencies was inconclusive, so the election was decided by Friday’s voting in the remote farming constituency of Tain.
FROM RULING PARTY TO LOSING PARTY
The NPP, which lost its parliamentary majority in the December 7 poll but remains in power until President John Kufuor steps down on January 7, boycotted the Tain vote over security concerns.
The party also tried unsuccessfully to prevent the Tain vote taking place through a court injunction.
"Without a doubt the road today has been long and hard work," Afari-Gyan said.
Each side has accused the other’s supporters of violence and irregularities and appealed to the electoral commission to review some results from last Sunday’s vote.
Afari-Gyan said the commission had found no evidence to call the results into question and declared Mills president-elect.
"The wrangling between the two parties has been a slur on Ghana’s democratic credentials," Kissy Agyeman, Africa analyst at London-based consultancy Global Insight, told Reuters before the result was announced.
"I think there is demand for change … power outages and corruption in the NPP have really been the key issues for people," she said.
Mills and his centre-left NDC campaigned on a platform of change after eight years of NPP rule, though analysts say the two parties’ policies are broadly aligned.
Kufuor took power after Mills’s NDC ally, former coup leader Jerry Rawlings, gave up power in early 2000 as required by the constitution which his own administration had introduced.
Kufuor’s eight years in office have seen Ghana’s economy grow into one of the most attractive investment destinations in the region.
But critics say his administration has failed to tackle widespread corruption, including smuggling of cocaine and other drugs in which administration officials have been implicated.