Virginia Gov. Terry McAuliffe (D) in December. (Evelyn Hockstein/For The Washington Post)

VIRGINIA LAWMAKERS from both parties joined forces recently to reverse the effects of a pernicious state Supreme Court ruling that could give state and local officials a free hand in hiding the workings of government. That apparent legislative victory for transparency has now been put at risk by Gov. Terry McAuliffe (D), who has threatened to gut a good bill.

The stakes in the legislative fight in Richmond are high, although the McAuliffe administration asserts the opposite. The court ruling, rendered in the fall, ignores the clear intent of the state’s Freedom of Information Act, which is designed to enable public access to information, with certain discrete exemptions.

A majority of the court, siding with the state in a case involving the contested release of documents related to procedures for carrying out Virginia’s death penalty, said officials could refuse disclosure if the requested material contained even a scrap of information exempt under the FOIA. A state lawmaker who had requested the documents, Sen. Scott A. Surovell (D-Fairfax), had argued, sensibly, that officials could simply edit out the exempt bits and release the redacted documents.

A respected judge who dissented from that key part of the ruling, former attorney general William C. Mims, said the court had gone overboard. Virtually the entire General Assembly agreed. Legislation sponsored by Mr. Surovell and Del. James M. LeMunyon (R-Fairfax) would restore the original intent and meaning to the law. Their identical bills would require officials to redact requested documents, when necessary, rather than withhold them. With almost no opposition, the General Assembly passed the bills.

The governor argues that the legislation goes too far to correct what he sees as a ruling whose impact is limited, and lawyers for his administration say it would saddle state and local agencies with excessive administrative burdens and costs. Brian Coy, a spokesman for the governor, called the measure a “sledgehammer solution to a tadpole problem.”

In fact, the risk is that the governor’s amendments, which are still being negotiated with the legislature, would impose a sledgehammer of a problem on the state. They would leave in place the court’s ruling while having the commonwealth’s mostly toothless Freedom of Information Advisory Council study the issue.

The governor’s view is that the court’s ruling does not apply to state and local agencies beyond the Department of Corrections, which was the subject of the original dispute over requested documents. But it’s difficult to see why other agencies of government would not wield the court’s decision in trying to withhold documents they’d prefer not to redact.

As Mr. Surovell pointed out, the court ruling, and the governor’s stance, incentivizes officials to “sprinkle little nuggets of exempt information” through records, thereby creating a pretext to withhold them entirely from public view.

Virginia’s record on openness and accountability is already poor; unlike many state legislatures, the General Assembly in Richmond does not even record most committee votes, thereby leaving citizens in the dark about the activities of their elected representatives. Leaving the court ruling in place would be a further step backward. Lawmakers should restore the original language of the bill and discard the governor’s amendments.