RICHMOND, Va. (AP) — A judge on Thursday indefinitely extended an injunction preventing the Virginia governor from removing a historic statue of Gen. Robert E. Lee from a famed avenue in the former capital of the Confederacy.

Richmond Circuit Court Judge Bradley Cavedo made the decision after hearing from attorneys for the state and for the plaintiff in a lawsuit against Gov. Ralph Northam. Earlier this month, Cavedo had issued a 10-day injunction barring Northam from removing the bronze equestrian statue of the Confederate hero from Monument Avenue.

Cavedo granted a motion from the state to dismiss the case, agreeing that the original lawsuit had issues of legal standing, but he also gave the plaintiff, William C. Gregory, another 21 days to file a new complaint. Gregory is described in the lawsuit as a descendant of signatories to an 1890 deed that transferred the statue to the state more than a century ago.

“I want Mr. Blackburn to have another shot at it," the judge said, referring to Gregory's attorney, Joseph Blackburn Jr. Gregory and Blackburn declined to comment as they left the courtroom.

State Attorney General Mark Herring said the judge had given the plaintiff “an opportunity to come back again and have another bite at the apple.” But he said he was confident the result would be the same the next time and pledged to fight as long as it takes to remove the statue, which he called a symbol of oppression.

“I want to be clear about this," Herring said at a news conference after the hearing. "This grandiose monument to a leader of a four-year armed insurrection against the United States of America in order to perpetuate a brutal and immoral system that enslaved millions needs to come down.”

Northam, a Democrat, recently ordered the statue’s removal, citing the pain gripping the nation over the videotaped killing of George Floyd, a black man in Minneapolis who pleaded for air as a white police officer pressed a knee into his neck.

Floyd’s death has sparked global protests that participants have vowed to turn into a sustained movement focused on addressing racial injustice and police brutality. It also spurred intense reexamination of statues and monuments of historical figures around the world.

Alena Yarmosky, Northam's spokeswoman, said the governor's administration was disappointed with the injunction but said it was not unexpected.

“We are evaluating the specific next steps but make no mistake - this statue will be removed,” she said in a written statement.

The 12-ton (11-metric-ton) Lee statue is about 21 feet (6.4 meters) tall and sits on a pedestal nearly twice that high in the grassy center of a large traffic circle on Monument Avenue, a prestigious residential thoroughfare in Richmond. Now cloaked in graffiti, it and other nearby monuments have become a rallying point during more than two weeks of protests and occasional clashes with police.

The statue was unveiled before a massive crowd in May 1890, at a time when the Civil War and Reconstruction were long over, and Jim Crow racial segregation laws were on the rise.

Judge Cavedo wrote in his original injunction order that it was in the public interest to delay any action until the resolution of the lawsuit, which argues that the state agreed to “faithfully guard” and “affectionately protect” the monument.

Herring, also a Democrat, argued in a brief filed Tuesday that the 1890 deed transferring the statue does not prevent the governor from removing it or entitle Gregory to injunctive relief.

“The only question is whether a single plaintiff may call upon the equitable powers of this Court and use 130-year-old documents and inapplicable doctrines of property law to countermand the Governor’s decision. He cannot,” Herring's brief said.

The Lee statue is one of five Confederate monuments along Monument Avenue, part of which has been designated a National Historic Landmark district. Monuments along the avenue have been tagged with messages that say “end police brutality” and “stop white supremacy."

Recently, protesters pulled down a century-old statue of Confederate President Jefferson Davis that stood along Monument Avenue.

Richmond Mayor Levar Stoney announced plans to seek the removal of the other Confederate monuments on the avenue, including statues of Confederate Gens. Stonewall Jackson and J.E.B. Stuart. Those statues sit on city land. The Lee statue is on state property.

Del. Lamont Bagby, chairman of the Virginia Legislative Black Caucus, called the statue's removal “inevitable.”

In remarks after Thursday's hearing, Bagby said he is concerned about potential clashes between protesters of police violence who have been gathering regularly at the statue and people who want to keep the statue up.

“The longer it’s there, the more risk we have of them clashing, and that won’t be good for anyone,” he said.

Associated Press reporter Alan Suderman contributed to this report.