There was a carnival atmosphere in Ghana's capital, Accra, on the day of the inauguration of John Atta Mills as president.
Mr Atta Mills won a cliff-hanger election victory for the National Democratic Congress (NDC), beating the ruling party's candidate by a margin of less than 0.5% of votes.
Tens of thousands of people descended on Independence Square wearing NDC party colours and there were lively celebrations.
Defeated presidential candidate Nana Akufo-Addo also attended the inauguration, a sign, the BBC's Will Ross says, that Ghana has a relatively mature democracy.
Former president and NDC founder Jerry Rawlings (right) was also at the ceremony. He saw his former rival John Kufuor stand down as president after serving the maximum two terms.
Reporters say many Ghanaians were proud to see the country setting a good example to the region. Nigeria's leader Umaru Yar'Adua (left) was one of several heads of state who attended the ceremony.
After he was sworn in, Mr Atta Mills raised up the State Sword - representing government authority - to cheers from the crowd.
And in his first address, the 64-year-old spoke of a new dawn in Ghana and promised to lead an open and honest government.