The Supreme Court has allowed the burial of former dictator Ferdinand Marcos at a heroes' cemetery in Manila, in a ruling which critics say "wipes the Marcos slate clean" and will divide the Philippines.
"While he was not all good, he was not pure evil either. Certainly just a human, he erred like us," said the court in a summary of its decision.
Court spokesman Theodore Te announced that the 15-member court voted 9-5 - with one abstention - to dismiss petitions opposing Philippine President Rodrigo Duterte's approval of Mr Marcos' burial at the cemetery, where former presidents, soldiers and national artists have been laid to rest.
Mr Te said the nine justices who ruled in favour of the burial agreed that Mr Marcos, as a former president, soldier and defence minister, qualified for a plot in the heroes' cemetery.
They disagreed that Mr Marcos was "dishonourably discharged" when he was ousted as president by a "people power" revolt in 1986.
They also believed that Mr Marcos was not convicted of "moral turpitude" and cases decided against him were all "civil in nature".
Mr Marcos ruled the Philippines for 20 years, with allegations of plundering up to US$10 billion (S$14 billion) from state coffers and overseeing widespread human rights abuses to decimate opposition to his rule.
More than 90,000 people were jailed and nearly 6,000 tortured during martial law from 1972 to 1983, rights campaigners say. At least 2,500 were said to have been summarily executed and about 800 bodies have yet to be found.
Mr Marcos fled with his family to Hawaii in 1986 when millions of people took to the streets in a "people power" revolt.
He died in exile on Sept 28, 1989.
In 1993, his body was flown back to the Philippines. He was supposed to be buried in Batac, his home town in Ilocos Norte province, 470km north of capital Manila. But the Marcos family instead installed his body inside a glass box at a mausoleum in Batac, where it remains to this day.
Past governments refused to allow Mr Marcos' burial at the heroes' cemetery because of the dictator's crimes.
The family's fortunes changed with the election of Mr Duterte as President in May this year. Mr Duterte said Mr Marcos, as a former president and veteran, deserved to be buried in the heroes' cemetery.
"It was a campaign promise delivered at the expense of history," said Senator Paolo Benigno Aquino, nephew of former senator Benigno Aquino Jr, who was murdered in 1983 purportedly by Mr Marcos' henchmen.
Senator Risa Hontiveros said the court's ruling "effectively wipes the Marcos slate clean and negates the sacrifices of the thousands of brave souls who fought and suffered under the brutal Marcos dictatorship".
Mr Felix Dalisay, 64, among those who were tortured by security forces serving Mr Marcos, said he would continue fighting until Mr Marcos' grave at the heroes' cemetery "is covered not by tears but by his spit".
Former senator Ferdinand Marcos Jr, Mr Marcos' son, described the decision as "magnanimous" and expressed hope that it will "lead the nation towards healing".