They were charged after Caleb Schwab died while riding the waterslide, which was marketed as the world's tallest slide.

"The court has grave doubts as to whether the irregularities and improprieties improperly influenced the grand jury and ultimately bolstered its decision to indict these defendants," Judge Robert Burns said. "Quite simply, these defendants were not afforded the due process protections and fundamental fairness Kansas law requires."

A spokesman for the Kansas Attorney General's Office, which prosecuted the case, didn't immediately return phone and email messages from The Associated Press.

Caleb was killed on the Verruckt — German for "crazy" — in 2016 when the raft he was riding went airborne and hit a metal pole. Two women who were with him in the raft were seriously injured. The slide never operated again and has been torn down .

While making his ruling, Burns noted the tragedy of Caleb's death.

"I obviously recognize that the circumstances and events giving rise to these indictments are indisputably tragic," Burns said. "A young child's life was lost and his troubling death was mourned by family, friends and the entire Kansas City community and beyond."

Schlitterbahn spokeswoman Winter Prosapio said in a statement, "We welcome today's decision which dismissed the charges against all defendants. We are thankful for all the support and encouragement we've received."

The evidence included video from a Travel Channel show documenting construction of the Verruckt, in which Henry and others emphasized the risks to riders on a raft dropping 17 stories before climbing a second, 50-foot (15.24-meter) hump. Defense attorneys argued the show was scripted for entertainment, showing flying boats. Defense attorneys argued the video didn't show how the ride actually worked, but the attorney general's office never told the jury it was a dramatization, though it showed boats flying up in a similar manner to how Caleb died.

The state argued that it was up to the jury to determine what was true and said the Travel Channel video should be presented at trial.

Defendants also claimed jurors repeatedly were told that the waterslide was not built to standards established by ASTM International, which might have led jurors to conclude the water park was breaking the law. But Kansas law didn't require the Verruckt meet those standards at the time of Caleb's death. The legislature toughened state law involving inspections and requirements after the boy died.

Lawyers also argued the grand jury shouldn't have heard testimony about another death at a Schlitterbahn park in Texas because it's not relevant to what happened here.

Caleb and his father, Scott Schwab, were at the park for a special day for state lawmakers. Schwab was elected Kansas secretary of state in November.

Caleb's family received nearly $20 million in settlements . The two women with Caleb on the raft settled for an undisclosed amount.

Schwab's office on Friday directed a request for comment to his family's attorney, Mike Rader, who did not immediately return a telephone message.