Ex-Philippine dictator Ferdinand Marcos was given a hero's burial with military honours on Friday, a deeply controversial move three decades after he was ousted in a "People Power" revolution.
The ceremony began with a 21-gun salute as soldiers in parade dress and ceremonial rifles stood to attention at the "Cemetery of Heroes" in Manila, after his body was secretly flown to the venue in an apparent effort to avoid protests.
The Supreme Court said last week that Marcos, who ruled the nation for two decades until millions of people took to the streets in the 1986 military-backed uprising, could be buried at the heroes' cemetery.
The decision, endorsing a recommendation from controversial President Rodrigo Duterte, outraged many opponents of the Marcos regime who said it would whitewash the dictator's many crimes.
The surprise move by the Marcos family and the government to bury him so quickly after the Supreme Court verdict, with appeals still to be heard, caused further outrage.
Barry Gutierrez, counsel for the anti-Marcos court petitioners, said the burial was illegal because of the outstanding appeals.
"It's not really surprising that this is happening. Marcos flouted the law when he was still alive, and even at his burial, he is still breaking the law," Gutierrez told AFP.
Police only announced that Marcos's body had been flown to the cemetery shortly before the ceremony began, leaving opponents who had been planning rallies flat-footed.
"We are shocked and angered," Gutierrez said.
Thousands of riot police and soldiers guarded the perimeter of the cemetery, but there were no protesters.
Journalists who rushed to the cemetery were barred from entering. However reporters were able to view the ceremony with long camera lenses from outside.
Marcos ruled the Philippines for two decades until forced into US exile by the "People Power" revolution, a largely peaceful event that inspired democracy movements throughout Asia and around the world.
Marcos, his infamously flamboyant wife Imelda, and their cronies plundered up to $10 billion from state coffers during his rule, according to government investigators and historians.
The dictator also oversaw widespread human rights abuses to maintain his control of the country and enable his plundering, with thousands of people killed and tortured, previous Philippine governments said.
Anti-corruption watchdog Transparency International in 2004 named Marcos the second most corrupt leader of all time, behind Indonesian dictator Suharto.
The Philippines' foreign debt went from $2.67 billion in 1972, when Marcos declared martial law, to $28.2 billion in 1986, according to the World Bank.
After Marcos died in Hawaii in 1989, his family began a successful political comeback and tried repeatedly to have him buried at the heroes' cemetery, where other presidents and celebrated military figures are interred.
Imelda became a congresswoman and fended off all corruption charges against her.
Two of her children established themselves as influential politicians. Ferdinand "Bongbong" Marcos Jnr, was the more successful, becoming a senator before almost winning the vice presidency this year.
However previous presidents had refused to allow the burial in the heroes' cemetery because of Marcos's crimes, so the family kept the preserved body in a glass casket at his home in the northern province of Ilocos Norte.
The family's fortunes changed with the election of Duterte, a longtime ally of the Marcos family, as president in May this year.
He said Marcos deserved to be buried at the heroes' cemetery based on the fact he had been a president and a veteran of World War II.
Duterte also said he owed loyalty to the family because his father served in the Marcos government and the family had helped fund his election campaign.