WARSAW — Surrounded by cheering supporters, Poland’s top Supreme Court justice took a defiant stand on the courthouse steps here Wednesday morning, hours after the government purged the tribunal. She vowed to keep fighting to protect the Constitution and the independence of the nation’s courts.

“I’m doing this to defend the rule of law and to testify to the truth about the line between the Constitution and the violation of the Constitution,” the justice, Malgorzata Gersdorf, told the crowd. “I hope that legal order will return to Poland.”

At the stroke of midnight, the government had effectively forced her and more than two dozen other justices out of their jobs, but on Wednesday morning, the authorities did not prevent her from entering the building.

The courthouse confrontation was followed by dueling news conferences, fiery speeches and more street protests.