WARSAW — For days, tens of thousands of Poles have marched in the streets to protest their nationalist government’s purge of the Supreme Court, an action that has been condemned by the European Union as a threat to the rule of law in a country that led the struggle against Soviet domination in 1989.

The crisis over judicial independence in Poland took a new turn on Thursday, when nearly half the judges on the country’s other top court, the Constitutional Tribunal, said its workings had become politicized and dysfunctional, casting into doubt the validity of crucial rulings it had made over the last two years.

Taken together, the purge of the Supreme Court and the open rebellion within the Constitutional Tribunal underscored the tensions over the future of the rule of law in a nation that once represented post-communist hopes for democracy but that is now under the grip of an increasingly authoritarian — though legitimately elected — government.

Lech Walesa, the Nobel laureate and former trade union leader who served as president of Poland after the fall of communism, has warned that the confrontation over the judiciary could lead to a “civil war.”