Madagascar's new army-backed leader Andry Rajoelina, who ousted the president, has been formally installed as leader.
Foreign ambassadors had intended to snub the event in the capital Antananarivo to underline global disapproval of the manner of Mr Rajoelina's rise, but his new foreign minister said they were not invited anyway.
Music blasted and military marksmen stood on rooftops at the ceremony attended by 40,000 people in the main sports stadium in the city.
Mr Rajoelina vowed to combat poverty and ensure security, adding he would not change Madagascar's free-market economics.
Andry Rajoelina, 34, took over after leading months of opposition protests against President Marc Ravalomanana.
That unrest killed at least 135 people, scared away tourists and unsettled investors in the fast-developing mining and oil sectors.
In the strongest show of displeasure from abroad, the African Union has suspended Madagascar after the opposition took power.
Major Western powers including the United States and the European Union have termed Mr Rajoelina's rise a coup and called for early elections. Several nations have suspended aid.
Africa's youngest and newest president is carefully calling himself "president of the transitional authority" because of the questions over the legality of his rise to power.
He is six years too young to be president, according to Madagascar's constitution, and is taking the presidency without any form of popular vote. The Constitutional Court, however, has endorsed him as national leader.
He has promised elections within two years, and the new government very deliberately termed Saturday's ceremony an "installation" rather than a "swearing-in".
Foreign minister Nyhasina Andriamanjato said Madagascar would soon be sending a delegation to talk with AU head and Libyan leader Muammar Gaddafi to try to salvage a planned summit of the pan-African body on the island later this year.