No one has defended the lavish spending. But the prospect of a mass judicial impeachment struck opponents as a partisan power grab by Republicans who control the governor’s office and both houses of the State Legislature. On the Supreme Court bench, three of the five justices were elected as Democrats. Any temporary replacements would be named by the Republican governor, Jim Justice, and would sit on the bench until a new election, a period that could last up to a year and a half.

A number of Democrats saw it, in the phrase of one lawmaker, as nothing less than “a coup.” And in a rare moment of public agreement, the state chapter of the A.F.L.-C.I.O. and the state chamber of commerce called the impeachments an unwelcome precedent.

[Read more about the impeachment vote from late Monday night]

Hours after the impeachment proceedings, Justice Robin Davis, who sat on the court for 21 years, announced at a brief news conference in the Supreme Court chamber that she had retired to free up her seat so that someone could run for it in November.

“When a legislative body attempts to dismantle a separate branch of government, the immediate effects as well as the precedent it sets for the future can only be deemed disastrous,” she read in a prepared statement. “The will of the people of West Virginia is being denied.”

The fifth justice, Menis Ketchum, resigned in July before entering a federal guilty plea, to having used a state-owned car to drive to golf outings. Mr. Ketchum was a Democrat, and his seat will be filled after an election in November. Members of the court are elected to 12-year terms.