A Madagascar army unit siding with anti-government protesters installed a new military chief as President Andry Rajoelina denounced an "attempt to seize power illegally".
The soldiers from the CAPSAT contingent joined protesters for a second day in a row, attending a rally in the capital to remember the people killed in more than two weeks of anti-government demonstrations that erupted on 25 September.
The unit, which played a major role in a 2009 coup that first brought Rajoelina to power, declared on Sunday AEDT it would "refuse orders to shoot" at demonstrators.
Soldiers then entered the city centre to meet several thousand protesters, who welcomed them with jubilation and praise.
Early on Sunday, the contingent claimed in a video statement that "from now on, all orders of the Malagasy army — whether land, air or the navy — will originate from CAPSAT headquarters".

Youth-led protests in Madagascar, initially sparked by water and electricity shortages, have since escalated. Source: AFP / Luis Tato
"I give him my blessing," said the minister, who was appointed by Rajoelina last week.
Pikulas admitted to journalists that events in Madagascar over the past few days had been "unpredictable". "So the army has a responsibility to restore calm and peace throughout Madagascar," he said.
Asked about calls for Rajoelina to resign, he said he refused to "discuss politics within a military facility".
Rajoelina said on the weekend: "An attempt to seize power illegally and by force, contrary to the constitution and to democratic principles, is currently underway."
"Dialogue is the only way forward and the only solution to the crisis currently facing the country," he said in a statement.
CAPSAT colonel Michael Randrianirina said his unit's decision to join the protesters did not amount to a coup. "We answered the people's calls, but it wasn't a coup d'état," he told reporters.
Why are people protesting in Madagascar?
The protests, inspired by gen Z-led movements in Kenya and Nepal, started over water and electricity shortages. They have since spread, with demonstrators calling for Rajoelina to step down, apologise for violence against protesters, and dissolve the senate and electoral commission.
Along Independence Avenue, Antananarivo's principal artery, protesters were shouting anti-government slogans on the weekend, waving Malagasy flags and riding motorbikes up and down the street, cheering.
"The president has been in power more than 15 years, and still there's no water, no electricity, no jobs," said Vanessa Rafanomezantsoa, a 24-year-old mother of two, unemployed and wearing torn clothes.
"Look at Madagascar. They [the government] are rich and we don't have enough to eat."

Some Madagascar soldiers joined the so-called gen Z protests, saying they would refuse any orders to shoot demonstrators. Source: EPA / Razafindrakoto Mamy
Some demonstrators have been sporting T-shirts and flags with the same symbol — a skull with a straw hat from the Japanese manga series One Piece — used by youth-led demonstrators in countries including Indonesia and Peru.
The United Nations has said at least 22 people were killed in the first days, some by security forces and others in violence sparked by criminal gangs and looters in the wake of the demonstrations.
Rajoelina has disputed the toll, saying last week there were "12 confirmed deaths and all of these individuals were looters and vandals".
Rajoelina's whereabouts are unclear
Officers of the gendarmerie, accused of heavy-handed tactics against the demonstrators, said in a video statement they recognised "faults and excesses during our interventions".
"We are here to protect, not to terrorise," they said.
To try to defuse the protests, Rajoelina last month sacked his entire government.
Meeting one of the demands of the protesters, the senate announced the dismissal of its president, Richard Ravalomanana, a former general of the gendarmerie paramilitary police.
Amid rumours that Rajoelina had fled, his government said on the weekend he remained in Madagascar and was managing national affairs. The new prime minister, Ruphin Zafisambo, said the government was "standing strong".
Neighbouring Mauritius, meanwhile, confirmed ex-prime minister Christian Ntsay and businessman Maminiaina Ravatomanga, a close adviser to Rajoelina, had flown in from Madagascar early on Sunday on a private flight.
Air France suspended its flights to the island until at least Tuesday while the African Union expressed "deep concern" and urged dialogue, calm and restraint. South Africa called upon "all parties to respect the democratic process and constitutional order".
Madagascar has had a turbulent political history since it gained independence from France in 1960.
Although rich in natural resources for farming, forestry, fishing and minerals, nearly three-quarters of the population of 32 million lived below the poverty line in 2022, according to the World Bank.