Bristol District Attorney C. Samuel Sutter knew the law. He also understood the threats posed by climate change. So for days he grappled with what to do about the two environmental activists facing criminal charges for blocking a 40,000-ton coal shipment last year to the Brayton Point power plant in Somerset.

Just as the trial was about to begin Monday, Sutter decided to drop all charges.

Then, in a dramatic appearance at Fall River District Court, he said he empathized with the stance of Ken Ward and Jay O’Hara, who said they were acting to reduce harm to the planet when they used the lobster boat Henry David T. to block the shipment to the coal-burning plant.

“Because of my sympathy with their position, I was in a dilemma,” Sutter said afterward. “I have a duty to go forward to some extent with this case and to follow the applicable case law, but they were looking for a forum to present their very compelling case about climate change.”

He added: “I do believe they’re right, that we’re at a crisis point with climate change.”

The turn of events stunned the activists, who faced up to two years in jail for attaching a 200-pound anchor to their keel to block the path of the coal ship in May 2013.

They were planning a rare use of the so-called necessity defense, and would have called a number of high-profile witnesses, including NASA climate scientist Jim Hansen and environmental activist and author Bill McKibben.

In exchange for having the state drop charges of conspiracy to commit a crime, disorderly conduct, and motor boat violations, the men agreed to pay $2,000 each in restitution to Somerset and the State Police.

O’Hara, 32, a sailmaker from Bourne, said he had walked into the courtroom with “an open heart and mind to whatever path we would be taken.

“I was prepared to face the judgment of a jury of our peers.”

They were elated after their lawyers, who were working for free, told them about the deal and how they wouldn’t have to admit guilt.

Environmental activists (above, from left) Ken Ward and Jay O’Hara aboard the Henry David T., a refitted lobster boat they used to block the tanker Energy Enterprise from delivering 40,000 tons of coal to the Brayton Point powergenerating plant in May 2013 to try to limit the Somerset facility’s output of greenhouse gases.

BEN THOMPSON

Environmental activists (above, from left) Ken Ward and Jay O’Hara aboard the Henry David T., a refitted lobster boat they used to block the tanker Energy Enterprise from delivering 40,000 tons of coal to the Brayton Point powergenerating plant in May 2013 to try to limit the Somerset facility’s output of greenhouse gases.

“I had a feeling of goodness in my heart that there are others in a position of authority that truly understand the magnitude of what we’re facing, and the means we need to go to to change the course,” O’Hara said. “This is the response we need to be getting from elected and appointed officials if we’re going to change our trajectory on the climate.”

Ward, 57, a carpenter from Corbett, Ore., called the outcome of the case “quite extraordinary.”

“We lost an opportunity to educate the public, but we gained an extraordinary statement,” he said of Sutter’s abrupt decision to drop the charges.

But Ward and O’Hara lament they have yet to accomplish their goal of shuttering the 51-year-old, 1,528-megawatt power plant, which is one of the region’s largest contributors to greenhouse gases.

The Somerset plant, which is in the process of being sold to Houston’s Dynergy Inc., is slated to close in 2017.

“They’re still burning coal,” O’Hara said, noting the Brayton Point electricity-generating facility has increased its output in recent years. “Our effort was to shut this plant, and that hasn’t been achieved.”