Sammy AwamiBBC Africa, Antananarivo and Omega RakotomalalaBBC Monitoring
Col Michael Randrianirina has been sworn in as the new president of Madagascar days after a military takeover on the Indian Ocean nation.
He swapped his fatigues for a suit and thanked the young people who took to the streets for weeks of protests that prompted President Andry Rajoelina to flee the country and led to his impeachment.
The ceremony took place at the Constitutional Court in the capital, Antananarivo, where a large crowd gathered to watch - including those who spearheaded the demonstrations.
"Today marks a historic turning-point for our country. With a people in full fervour, driven by the desire for change... we joyfully open a new chapter in the life of our nation," he said.
The former French colony now enters a transition period, which will be full of political obstacles and legal uncertainty - though there is cautious optimism about Col Randrianirina's leadership.
Constitutional Court president Florent Rakotoarisoa has criticised the international community for describing the situation in Madagascar as a coup.
He denied that there had been a violation of the constitution in Madagascar, instead blaming the constitution for causing the situation to deteriorate.
Protesters had hoped that Rajoelina would simply resign and pave the way for a smooth, democratic transition.
Instead, he clung to power, dissolving his government and holding a series of dialogues with different groups of people, efforts that were not enough to appease the protesters.
The protests, which started last month, were initially organised by a youth movement known as Gen Z Mada - angered by persistent power and water shortages.
Col Randrianirina was head of Madagascar's elite CAPSAT army unit, when on Tuesday his troops joined the thousands of protesters on the streets of the capital.
He told the Gen Z demonstrators he was taking power and that the military would form a government and hold elections within two years.
Pro-democracy advocates, both inside and outside the country, hope that this promise will be fulfilled.
At the ceremony at the country's top court, Reuters news agency reports that trumpets blared after Randrianirina took his oath of office, promising to "dedicate all my strength to defending and strengthening national unity and human rights".
Wearing an official sash and star of office, he reaffirmed his commitment to change.
"We will work hand in hand with all the driving forces of the nation to draft a fine constitution," he said, adding that electoral reforms would be instituted before a new vote was held.
"We are committed to breaking with the past. Our main mission is to thoroughly reform the country's administrative, socio-economic and political systems of governance."
After the ceremony, the new president spoke to reporters outside the constitutional court and outlined in more detail what he considered to be his top priorities.
He said he would start with launching an investigation into the state-owned water and power company, Jirama.
"Today and tomorrow, we will examine the situation at Jirama - what is happening there and what problems currently exist. This review aims to prevent further difficulties in the future. That is our first social priority," he said.
"The second priority is rice farming. As we enter the agricultural season, we must assess how best to proceed.
"The third priority is the appointment of the prime minister and formation of the government."
Like other former French colonies in Africa that have experienced coups in recent years, it has been hinted that relations with France may also change under his leadership with warmer ties sought with Russia.
On Thursday, Randrianirina attended a meeting with Russian embassy officials to reportedly discuss "serious" co-operation between the two countries.
Earlier during the protests, people had been seen on the streets waving Russian flags calling for Moscow's intervention.