A state judge in Virginia ruled on Wednesday that the city of Charlottesville cannot legally move the two statues to Confederate generals that sparked mass protests.

Circuit Judge Richard Moore ruled that a Virginia state law created to protect memorials prohibits the city’s plans to remove the statues.

“Moore issued a permanent injunction preventing the statues from being moved at the beginning of a trial over a lawsuit brought against the city by groups that wanted to preserve the statues,” the Hill reported.

The law in question is the Code of Virginia “Memorials for War Veterans” rule, which states:

It shall be unlawful for the authorities of the locality, or any other person or persons, to disturb or interfere with any monuments or memorials so erected, or to prevent its citizens from taking proper measures and exercising proper means for the protection, preservation and care of same.

Moore’s ruling came as part of a lawsuit filed by a group hoping to protect the statues from the left-wing politicians looking to move them.

The suit, filed in March 2017, alleged that when the city council announced that it intended to destroy the statues to C.S. Gens. Robert E. Lee and Thomas Jonathan “Stonewall” Jackson, it was violating the very law that Moore affirmed in his ruling.

Moore recognized that the statues have become controversial, but he was obliged to order that they stay where they stand. He wrote in the ruling:

While some people obviously see Lee and Jackson as symbols of white supremacy, others see them as brilliant military tacticians or complex leaders in a difficult time … and do not think of white supremacy at all and certainly do not believe in, accept or believe in such. In either event, the statues to them under the undisputed facts of this case still are monuments and memorials to them, as veterans of the civil war.

The statues, of course, became the focus of protests that eventually led to a mass riot in Charlottesville in August 2017, which saw forces of several white nationalist groups clashing with domestic terror outfit Antifa.

One woman was killed when a self-professed white nationalist used his car to slam into a crowd of left-wing protesters.

Follow Warner Todd Huston on Twitter @warnerthuston.