RICHMOND — The Supreme Court of Virginia has thrown out a lower court's injunction that stopped the city from removing Confederate statues, handing a victory to Mayor Levar Stoney and his aggressive campaign to take down monuments.

The court ruled Wednesday that the anonymous resident who challenged Stoney’s actions had no legal standing to file suit under a new state law that took effect July 1.

“Because Anonymous failed to allege a potentially viable right of action, he or she was not entitled to a temporary injunction,” six of the court’s seven justices wrote. “The circuit court abused its discretion in determining otherwise, and we vacate the temporary injunction.”

One justice did not take part in the case for undisclosed reasons.

Circuit Court Judge Bradley B. Cavedo had issued the 60-day injunction last month after granting the plaintiff anonymity in a lawsuit challenging Stoney’s actions. The mayor defied the advice of the acting city attorney July 1 when he ordered work crews to take down a statue of Stonewall Jackson on city property along Monument Avenue.

His action followed a month of protests over racial inequity, during which demonstrators pulled down a statue of Confederate President Jefferson Davis as well as a monument to Christopher Columbus, who has become reviled for his treatment of Indigenous peoples.

Invoking a state of emergency authorized by Gov. Ralph Northam (D), Stoney (D) said the statues had become a threat to public safety and should be at least temporarily removed. In the week following Jackson’s removal, work crews took down two other figures on Monument Avenue as well as several memorials around the city.

By the time Cavedo issued the injunction, only one Confederate statue remained on city property — a monument to Gen. A.P. Hill in a traffic circle north of downtown. The city was slow to remove that one because Hill’s body is interred beneath it; Stoney’s spokesman said Thursday that the city is still studying the issue.

Cavedo later recused himself from the case, saying his personal residence in the Monument Avenue Historical District created the appearance of a conflict of interest.

Stoney’s lawyers appealed the injunction to the state Supreme Court, noting that under the new state law, only city attorneys are authorized to challenge the removal of a Confederate statue. The high court ruled that the law does not grant that power to private citizens.

The justices did not consider the underlying lawsuit, which had been on hold as the appeal ran its course. It’s unclear what impact the ruling would have on that suit.

Earlier this month, the city council voted to make the statues’ removals permanent. It is now conducting a 30-day review process to determine what to do with the figures; the family of Gen. J.E.B. Stuart has requested that his likeness be sent to his ancestral home in southwestern Virginia. Richmond’s Valentine museum has agreed to take the Davis statue. The city is sorting through those and other offers.

Meanwhile, the grandest statue of all — to Gen. Robert E. Lee — remains on state property on Monument Avenue. Northam has ordered it removed but remains unable to act because of a separate Circuit Court injunction. The case is set for trial Oct. 19, and it was unclear whether the high court’s ruling about the right of private citizens to sue would affect that case.