The Philippine supreme court has ousted its chief justice following pressure from the government in a move widely regarded as unconstitutional and a threat to democracy.

Judges voted by a slim majority to remove Maria Lourdes Sereno after President Rodrigo Duterte publicly called for her to go in the wake of her criticism of his brutal war on drugs, which has left thousands dead. This put her at loggerheads with him, and she urged Filipinos to stand up to his authoritarian rule.

Ms Sereno also spoke up for law and human rights to be respected, citing the case of an opposition senator who was locked up on drug charges she says were fabricated. In her first news conference since being ousted, Ms Sereno urged Filipinos to help defend the constitution in a move that signalled she will continue to advocate for change.

“Staying quiet is tantamount to being an accomplice to their abuses,” she said, alluding to various issues under Mr Duterte’s leadership, including extrajudicial killings.

“I am a victim today, but I am just one of so many thousands upon thousands whose lives have been snuffed out, who continue to remain in detention, who have been unfairly accused or unfairly victimised by the very powerful forces in our society that must be exposed for what they are,” Ms Sereno said.

Her lawyers said she would appeal the unprecedented ruling by the court to remove her. She allegedly failed to declare her wealth before she became chief justice, as required by law.

However, she denied the allegation and argued that the widely expected ruling was unconstitutional because the country’s 1987 charter states that top officials, including justices like her, can only be removed by impeachment.

Ms Sereno, the first woman to lead the country’s supreme court, said the justices who voted to kick her out of the 15-member tribunal seized “the sole responsibility of the senate, brazenly violated their sworn responsibility to protect the constitution and destroyed the judiciary”.

Even allies of Mr Duterte publicly disagreed with the way she was ousted. Senate president Aquilino Pimentel III, a key ally of Mr Duterte, urged the supreme court to review its decision, saying it’s “not infallible in everything”.

Another senator, JV Ejercito, warned of a possible constitutional crisis. “What is alarming is the blatant disregard of the highest law of the land,” said Mr Ejercito. “I urge the public to remain calm. Despite this setback, let us not lose our confidence in our democracy.”

An opposition leader said the move made a mockery of the constitution and that congress should insist only it can remove such officials. Senator Francis Pangilinan, who heads the opposition Liberal Party, said: “The people should express to the court that the decision was wrong and unacceptable”.

Ms Sereno encouraged around 1,800 protesters who rallied outside the court in Manila to denounce her treatment and organise a movement to defend justice and accountability. “Let’s continue to defend the constitution and fight wrongdoing,” she told the crowd, as anti-riot police blocked an access road nearby with trucks and iron railings. “Let’s continue to spread the message of democracy and reason.”

Roman Catholic priest and protest leader Robert Reyes said outside the court: “This is more than a wakeup call. If we don’t wake up now, it will really be the death of democracy and sometimes history is cruel.” Once an independent judge like Ms Sereno is ousted, “there will be no more balance of power; Duterte will be a virtual dictator”, Mr Reyes said.

Ms Sereno now faces a separate impeachment bid in the House of Representatives, which is dominated by Mr Duterte’s allies. The president sought the removal of Ms Sereno and a leading anti-corruption prosecutor, Conchita Carpio-Morales, who he accused of allowing themselves to be used to discredit his administration.

In a speech last month, he said: “So I’m putting you on notice that I am now your enemy. And you have to be out of the Supreme Court.”