DOVER, Del. — A Delaware judge on has ruled against former state treasurer Chip Flowers in a Freedom of Information Act lawsuit against former Gov. Jack Markell.

In his ruling, Superior Court Judge Ferris Wharton on Tuesday reversed a decision in which former Chief Deputy Attorney General Danielle Gibbs questioned whether Markell’s office violated FOIA by withholding emails solely on the basis that they were sent by a lawmaker or legislative staff member, without regard to the content or context of the emails.

The issue arose because when boasting several years ago about extending FOIA’s open-government provisions to the General Assembly, state lawmakers specifically exempted their emails and their staffers’ emails from the definition of public records.

In rendering an opinion last year in a FOIA appeal by Flowers, Gibbs said it was impermissible to withhold an email solely on the basis that it was sent or received by a lawmaker or legislative staffer.

Wharton disagreed, saying the “plain language” of the legislative exemption leaves no room for interpretation.

“The court is mindful that exemptions are to be narrowly construed and that FOIA is to be construed to further open access to public records, but the court must resist the temptation to construe statutory provisions against their plain meaning,” the judge wrote.

At the same time, Wharton acknowledged that an unscrupulous person could keep secret any email that otherwise would have to be disclosed under FOIA simply by copying in a legislative staffer or lawmaker.

“The fact that a statute is potentially subject to abuse … is no warrant for the court to redraw the statute,” he concluded. “Accordingly, if the General Assembly is concerned about this possibility, then it, and not the court, must change the statute.”

Flowers said he will appeal to the Delaware Supreme Court.

“This is a huge blow to any Delawarean seeking documents under the state’s FOIA statute,” Flowers said in an email, adding that it sets “a terrible precedent” for any citizen seeking public documents from the governor’s office.

Flowers also noted that his legal costs in the FOIA fight have exceeded $80,000.

“Though I am blessed with the financial means to continue fighting, no citizen should have to spend this much money seeking documents that clearly belong to the public by law,” he said.

The dispute dates to 2015, when an archive established by Flowers filed a FOIA request seeking emails sent or received by Markell administration officials that referred to Flowers, his former deputy treasurer, the state’s Cash Management Policy Board, and certain board members.

In response, Markell’s office said some emails were exempt from disclosure by statute or common law, while others could be withheld because they were received from or sent by members of the General Assembly or their staffs. In at least one instance, Markell’s office refused to provide an email simply because the legislature’s controller general, who is also a member of the Cash Management Policy Board, which works closely with and advises the state treasurer, was copied on it.

After Flowers challenged the denial of records, the attorney general’s office said Markell’s office did not violate FOIA when it withheld documents protected by statute or common law, including those withheld under attorney-client privilege or “executive privilege.”

But Gibbs said her agency was unable to determine whether Markell’s office violated FOIA by citing the legislative exemption.

Flowers then filed a court appeal challenging the attorney general’s opinion regarding both the privilege exemptions and the legislative exemptions.

In a cross-appeal filed a few days later by an outside attorney hired at taxpayer expense, Markell’s office claimed that state law does not require it to review, or explain its rationale for withholding records under the legislative exemption. Markell asked the court to declare that any public body can withhold any emails received or sent by state lawmakers or their staffs.