A Philippine judge rejected on Monday an effort by President Rodrigo Duterte to arrest one of his fiercest critics, a decision hailed by opponents as a check on the leader and a victory for the rule of law.

The decision from a Manila court denied a government petition to take Senator Antonio Trillanes into custody on charges for which the lawmaker had already been granted amnesty.

Trillanes has attacked the president’s deadly narcotics crackdown, but also accused Duterte of corruption and his son of involvement in drug dealing.

“We wish to thank Judge Andres Soriano who has singlehandedly upheld justice and the rule of law in the country despite extreme pressure coming from the Duterte regime,” a beaming Trillanes told reporters.

The order for Trillanes’ arrest stems from the president voiding in September an amnesty granted eight years ago to the senator, an ex-navy officer, for his role in two coup attempts in the mid-2000s.

Duterte alleged the lawmaker did not complete the requirements of filing an official application and admitting guilt, but Monday’s ruling threw out those arguments.

However, this decision is unlikely to be the final word on this case. The Philippines’ top court is weighing the constitutional questions posed by Duterte’s amnesty revocation and the government all but pledged to appeal.

“This is not the end. Nobody has to claim total victory here,” Justice Secretary Menardo Guevarra told reporters. “This may be subject to review by the higher courts.”

Monday’s news came as Trillanes was on bail over another military uprising case that was revived by Duterte revoking the lawmaker’s amnesty.

His arrest last month in that case made Trillanes the second senator critical of Duterte’s drug war to be detained. Leila de Lima has been behind bars since February 2017 on charges she says were concocted to silence her.

Human Rights Watch called Monday’s decision a temporary victory for rule of law in the Philippines.

“We expect it (the government) to continue, even ramp up, this political harassment and intimidation,” he added.

Trillanes had faced rebellion and coup d’etat charges for being among military officers who rose up against then president Gloria Arroyo over alleged corruption and mismanagement.

He led scores of junior officers in taking over part of a main district of Manila in 2003 and seized a posh Manila hotel in 2007 along with several armed followers as they demanded Arroyo’s resignation.