The Philippines' Supreme Court ruled Tuesday that the late dictator Ferdinand Marcos can be buried at a heroes' cemetery, a decision that opponents said rolled back the democratic triumph of the "people power" revolt that ousted the strongman three decades ago.

"While he was not all good," the 15-member court said in passing judgment on one of Asia's most infamous strongmen, "he was not pure evil either."

PHILIPPINES PRESIDENT DUTERTE THREATENS TO CANCEL MAJOR AMERICAN ARMS DEAL

Court spokesman Theodore Te said the justices voted 9-5 with one abstention to dismiss petitions opposing President Rodrigo Duterte's approval of the Marcos family's plea for the dictator to be buried at the Heroes' Cemetery in metropolitan Manila, where former presidents, soldiers and national artists have been interred.

The decision on a deeply emotional issue that has divided the poor Southeast Asian nation can be appealed.

Outside the court, more than 300 Marcos supporters erupted in celebration, chanting the dictator's name repeatedly. Some waved Philippine flags and wept in joy. Anti-Marcos activists were outraged, and some of the petitioners vowed to ask the court to reconsider.

PHILIPPINES TERRORISTS SAY THEY ABDUCTED GERMAN, KILLED WOMAN

Riot police stood between the opposing groups.

"We are disappointed. We are heartbroken. We are outraged," a coalition of nearly 40 groups opposed to Marcos's burial at the cemetery said in a joint statement. "With this decision, the very definition of hero is now in question."

Sen. Risa Hontiveros, an anti-Marcos activist in her younger years, lamented the decision. "No tombstone, no grandiose cemetery can change the fact that Marcos was not a hero," she said in a statement. "He was a plunderer, torturer and a thief with a family seeking to rewrite history to serve their interests."

The dictator's son and namesake, former Sen. Ferdinand "Bongbong" Marcos Jr., thanked the high court for its "magnanimous act to uphold the rule of law" and expressed his gratitude to Duterte.

"It is our sincerest hope that this will lead the nation towards healing," Marcos Jr. said in a statement, citing the decades of discord over his father's burial.

The Marcos family did not immediately announce a burial date.

Burying a dictator accused of massive rights violations and corruption by thousands of activists and dissenters at the heroes' cemetery has long been an emotional issue in the Philippines, where Marcos was ousted by a largely nonviolent army-backed uprising in 1986. At the height of the political turbulence, Marcos flew to Hawaii, where he lived with his wife, Imelda, and children in exile until he died in 1989.

The Philippine revolt became a harbinger of change in authoritarian regimes worldwide.

The Marcoses, however, have repeatedly denied any wrongdoing. The late dictator's wife, Imelda, and two of his children eventually ran for public office and won in a stunning political comeback. Marcos Jr. ran for vice president in May and garnered more than 14 million votes, but lost by a slim margin.

In 1993, Marcos's body was flown back to his hometown in the northern province of Ilocos Norte, where it has been displayed in a glass coffin and became a tourist attraction. But his family fought for his remains to be transferred to the heroes' cemetery.

Duterte, who took over the presidency in June, backed the dictator's burial at the cemetery, citing Marcos's privilege as a president and soldier, and taking a political risk in a country where pro-democracy advocates still celebrate Marcos's ouster each year.

Duterte has said his late father, a former provincial governor, had served in Marcos's Cabinet and was one of his most loyal men. He acknowledged that one of Marcos's daughters, Imee Marcos, the current governor of Ilocos Norte, had backed his presidential bid.

After the court ruled, Duterte's spokesman, Ernesto Abella, expressed "hope the matter will finally be laid to rest, and that the nation finds the wherewithal to move forward." The military, which is in charge of burials at the heroes' cemetery, said it would abide by the decision.

The Supreme Court dismissed seven petitions, including by former torture victims under Marcos, that argued that an honorable burial for the dictator is "illegal and contrary to law, public policy, morals and justice." Opponents cited Duterte's political debt to the Marcoses.

Marcos had not been convicted by final judgment of any offense involving moral turpitude, the court ruled, saying court convictions cited by anti-Marcos petitioners were civil in nature.

While critics may disregard Marcos as president and commander-in-chief due to his human rights abuses, the court said he cannot be denied the right to be acknowledged as a former legislator, a defense secretary, a military member, a war veteran and a Medal of Valor awardee.

"We agree with the proposition that Marcos should be viewed and judged in his totality as a person," the court said, adding that he was "just a human who erred like us."

Despite the ruling, Sen. Hontiveros called on Duterte to reject plans to give Marcos a heroes' burial and "to rise above his indebtedness and loyalty to the Marcos family."

Left-wing activist Renato Reyes said his group could not accept the court decision.

"Our protests will hound Marcos all the way to his grave," Reyes said.