Colonel Michael Randrianirina, commander of an elite army unit, was sworn in on Friday as Madagascar’s new president following a swift military coup that ousted President Andry Rajoelina and sent him into hiding.

The ceremony took place at the High Constitutional Court before nine judges and senior officials, just three days after Randrianirina declared the military had taken control of the country.

Rajoelina reportedly fled Madagascar on a French military aircraft after soldiers loyal to Randrianirina turned against him amid weeks of youth-led protests over poverty, corruption, and poor governance. His exact whereabouts remain unknown.

The United Nations and African Union have condemned the coup, with the AU suspending Madagascar from its activities. UN Secretary-General António Guterres called for an immediate return to constitutional order.

Randrianirina, 50, once jailed for an attempted mutiny, said the country will be governed by a military council for up to two years before elections are held.

“We will restore the country to its former glory and fight insecurity while addressing the social problems facing our people,” he said.

The former French colony, where about 75 percent of citizens live in poverty, has endured repeated coups since independence in 1960. Rajoelina himself first rose to power through a military-backed takeover in 2009.

Despite global condemnation, the takeover has been largely welcomed on the streets, with many young Madagascans cheering soldiers seen as champions of long-awaited change.