The Missouri Department of Corrections has changed its execution witness-selection policy as part of a lawsuit settlement.

The change in policy led to the formal dismissal of the federal suit filed by the American Civil Liberties Union (ACLU) in 2016 on behalf of BuzzFeed News journalist Chris McDaniel. U.S. District Judge Nanette Laughrey of the Western District of Missouri in Kansas City ordered the dismissal Tuesday of the suit against former Department of Corrections Director George Lombardi.

The Department under current Director Anne Precythe has agreed to give media organizations the authority to choose their own representatives rather than leaving it up to the director to include or exclude specific reporters. The agreement came roughly a month after the ACLU objected to Precythe’s previous proposal for a nondiscrimination clause, which it claimed didn’t address viewpoint discrimination.

McDaniel, who worked for Buzzfeed and St. Louis Public Radio, wasn’t granted access to witness a 2014 execution after reporting that Missouri’s execution drug supplier was not licensed to sell in Missouri, which could be a felony. A lawsuit led to the pharmacy agreeing to no longer sell execution drugs to Missouri.

According to the ACLU, McDaniel was denied the opportunity to witness 17 executions that the state carried out since he applied to be a witness.

Under the new agreement, the Department of Corrections will now permit the Associated Press, the Missouri Press Association, the Missouri Broadcasters’ Association, and Missourinet, as a news outlet with a broad reach across the state, to designate a reporter to witness executions.

ACLU of Missouri legal director Tony Rothert issued a statement Tuesday criticizing the previous Department of Corrections policy for granting the witness of executions. “The government cannot give or deny access to a reporter based on government officials’ feelings about an individual’s reporting,” said Rothert. “A free press is vital to ensuring that the government remains accountable to the people. Allowing the government to pick and choose which reporters have access to government functions is a vital threat to fair and unbiased reporting.”

Additional reporting by McDaniel included a September 2014 story revealing that Missouri had been injecting inmates with high levels of a sedative before execution witnesses were ushered into the room. The Department of Corrections later changed its policy to make the sedative optional.  2016 stories by McDaniel showed that high-ranking Department of Corrections officials handed out more than $250,000 in cash stuffed in envelopes to pharmacists and that Missouri’s former execution drug supplier admitted to committing hundreds of pharmaceutical violations.