Some 63 judges have condemned the government's blanket amnesty bill, saying it will destroy the rule of law and set the wrong precedent for society.
It is the first time that Court of Justice judges have publicly expressed their political views.
The 63 judges calling themselves the group of "Judges Who Love the Motherland" on Tuesday signed a statement declaring their opposition to the amnesty bill. They said the statement reflected their personal opinions and had nothing to do with any court or judicial organisation.
They said in the statement that the bill would grant a blanket amnesty for criminal wrongdoers. These people's guilty actions derived from political motivation, undermined the rule of law and attempted to destroy the legal framework that protects innocent people and maintains peace and order in society, they said. The amnesty bill, the statement said, ignored damaged parties affected by those actions.
The amnesty bill would also whitewash people convicted of corruption and malfeasance who were a threat to the country, said the judges. Those convicted of graft must face punishment since they severely harmed the county through actions deemed unacceptable by international society.
"As judges, we are duty-bound to maintain righteousness and justice in this country. We strongly oppose the amnesty bill, which is to go before the Upper House, the judges said.
They called for all parties involved in the bill's passage through parliament to immediately review or scrap it to prevent ongoing protests from escalating into violence.
Meanwhile, the National Anti-Corruption Commission (NACC) commissioner Vicha Mahakhun, also the NACC's spokesman, said the commission had agreed to voice its opposition to the bill.
The agency is concerned that the corruption cases it handled would be affected if the bill is enacted.
It fears the bill, if and when it becomes law, would cause the corruption cases, including those filed against political post-holders by the coup-installed Assets Scrutiny Committee, to be nullified.
The NACC on Tuesday said the government's amnesty bill would affect 25,331 corruption cases which the NACC has investigated.
Of this number, 666 cases, including those filed by the ASC, were found to have grounds.
Mr Vicha said the NACC was opposed to sections 3 and 4 of the amnesty bill because they would result in the 666 corruption cases being invalidated.
The bill also contravenes the UN's 2003 Convention against Corruption, to which Thailand is a signatory, said Mr Vicha.
The fundamental principle of the convention recognises the danger which corruption poses to a nation's security as it destroys democracy, moral values and justice.