Madagascar's constitutional court has declared Andry Rajoelina the new president of the Indian Ocean island.
His appointment came a day after his rival was swept from office by the army.
Mr Rajoelina, 34, a former disc jockey, partied with supporters in the street after meeting with his ministers.
Under the current constitution, Mr Rajoelina is six years too young to be elected president.
He indicated in a television interview that he would organise a fresh presidential election within two years.
The priorities for Africa's newest leader are anti-poverty programmes demanded by locals, handling international concerns at his appointment and controlling some dissent in the armed forces.
'We will bring about the return to a normal life, to security and above all national reconciliation, which is at the heart of democracy,' he told several thousand fans celebrating in May 13 Square in the capital, Antananarivo.
President Marc Ravalomanana resigned yesterday after most of the military backed his rival, who had led weeks of anti-government strikes and protests.
UN chief Ban Ki-moon expressed concern and he urged all sides 'to act responsibly to ensure stability and a smooth transition through democratic means'.
'This peaceful path can only be the result of transitional arrangements arrived at by consensus and enjoying wide support,' he added in a statement.
Mr Ravalomanana's whereabouts following his resignation were not immediately clear but there is speculation that he might flee into exile.