TALLAHASSEE, Fla. (AP) After two years of denying that detailed COVID-19 data relating to 2021 infections and vaccines existed, and then being forced by a court to turn it over, Gov. Ron DeSantis and the Florida Department of Health have agreed to a settlement that will require the state to disclose coronavirus data on its web site and pay attorneys fees for attempting to circumvent state public records law.

The settlement, announced Monday by the Florida Center for Government Accountability, a non-profit public records watchdog which sued the state on behalf of former state Rep. Carlos Guillermo Smith, requires the department to publish detailed COVID-19 data on the Florida Department of Health website and pay $152,250 in legal fees to attorneys representing FLCGA and Smith.

“The department lied about the existence of these public records in court and did everything to restrict information and downplay the threat of COVID even while the Delta variant ripped through Florida — a decision that cost many lives,” Smith, an Orlando Democrat, said in a statement.

“It is unfortunate that we have continued to waste government resources arguing over the formatting of data with armchair epidemiologists who have zero training or expertise,’’ Williams said.

Smith, who in 2021 was a member of the House Pandemics & Public Emergencies Committee, sued the state in August 2021 after submitting a public records request to the Department of Health seeking detailed COVID-19 information in his home county as the cases of the Delta variant spiked. The Miami Herald, the Tampa Bay Times, and several other news organizations, as well as the First Amendment Foundation, joined the lawsuit.

At the time, a third wave of cases was ballooning in Florida and hospitalizations were rising dramatically, but the Department of Health was changing the way it reported death data to the Centers for Disease Control and Prevention, giving the appearance of a pandemic in decline, a Miami Herald analysis found.

Both Smith and FLCGA said they had hoped the information sought would illustrate the larger impact of the virus in each region of the state — including the ages, sex, ethnic and racial demographics of those with confirmed cases of the virus, and vaccination rates for the county — to better inform the public of its risks.

At the time of the Department of Health’s shift in policy in the summer of 2021, President Donald Trump had failed to win re-election and DeSantis was running for a second term as governor while attempting to position himself to seek the GOP nomination for president. Condemning the reliability of COVID-19 data and the federal government’s handling of the COVID-19 virus, as well as discrediting the science behind the vaccine, would become a central plank in DeSantis’ platform.

The August 2021 decision was not the first time the DeSantis administration had withheld COVID-19 data from the public as the governor was pursuing a different political narrative, however.

In the spring of 2020, when Trump was seeking re-election and was hoping to show that the virus was on the decline, the governor and his agency officials changed the way the state handled other infectious diseases. De-Santis announced that most of the state would reopen for business on May 4, 2020, citing a “data-driven strategy” and success at achieving the federal “benchmarks” that included a drop in infections.

But when the Miami Herald obtained the data and examined it against the governor’s claims, it became clear that the governor either wasn’t aware the data showed that community spread, regional outbreaks and death tolls were worse than he was telling Floridians, or he selectively focused on outdated statistics to make his case and help the president claim Florida was “open for business.”

The settlement agreement vindicates the position that “transparency and accountability are not negotiable. The Constitution mandates it,’’ said Michael Barfield, director of Public Access Initiatives at FLCGA. “The Department hid public records during the height of the pandemic to fit a political narrative that Florida was open for business.”

The settlement agreement requires the Department of Health to provide detailed COVID-19 data for the next 3 years, including vaccination counts, case counts, and deaths, aggregated weekly, by county, age group, gender, and race.