BAGLEY-The Minnesota Court of Appeals dismissed an appeal by Clearwater County prosecutors Monday, paving the way for four anti-pipeline activists to argue during trial that they had no choice but to disrupt a pipeline transporting tar sands oil.

The dismissal was released six months after Ninth District Judge Robert Tiffany ruled that Annette Klapstein, 65, of Bainbridge Island, Wash., Emily Johnston, 51, of Seattle, Benjamin Joldersma, 39, of Seattle and Steven Liptay, 37, of Brooklyn, N.Y., could present a necessity defense during their trial.

A necessity defense is used to shield people who must break the law in order to prevent greater harm.

The four were arrested Oct. 11, 2016, after Johnston and Klapstein used bolt cutters to cut padlocks and chains in order to access a pipeline facility near Leonard, Minn. Liptay, a documentarian and photojournalist, was documenting the act and Joldersma went along to help with safety precautions.

Canadian energy company Enbridge, which owns the disrupted pipeline, received a warning call from the group and shut down the valve for about a day.

Klapstein, Johnston and Joldersma are all charged with felonies. Liptay is charged with two gross misdemeanors.

The battle over the group's use of the necessity defense began in December 2016 when Timothy Phillips, the attorney representing the defendants, gave notice of his clients' intent to rely on the necessity defense. After months of back-and-forth and pages of memorandums outlining each sides' argument, Klapstein, Johnston, Joldersma and Liptay testified in front of Tiffany on Aug. 15, 2017. Clearwater County prosecutors objected to the use of the necessity defense, arguing in an earlier memorandum that it should not be used in cases involving protesters.

But each member of the group testified that they felt that climate change should be considered a "greater harm," and that civil disobedience was their only option. After Tiffany ruled in October that the group could go forward with the necessity defense, prosecutors appealed the decision.

In the court of appeals opinion, Judge Jill Halbrooks wrote that, in order to challenge the district court's ruling, the state must "clearly and unequivocally show both that the trial court's order will have a critical impact on the state's ability to prosecute the defendant successfully and that the order constituted error."

Though prosecutors argued that allowing the necessity defense "will unnecessarily confuse the jury," Halbrooks wrote that the state did not prove that Tiffany's ruling would impact the state's case, as it is not yet clear how the necessity defense would play out at trial.

"The district court's ruling does not have any immediate impact on the state's case in the absence of other yet-unmade rulings in trial," Halbrooks wrote.

The dissenting opinion of Judge Francis Connolly was also included in the ruling.

Information about the group's next court appearance was not immediately available.