(Reuters) - A climate-change activist who disrupted the flow of millions of barrels of crude oil into the United States as part of a coordinated protest of global warming was found guilty of burglary in Washington state on Wednesday.

But a Skagit County Superior Court jury deadlocked on a second charge of sabotage against Kenneth Ward, a co-founder of the Climate Disobedience Center.

“It’s a pretty good outcome, actually,” Ward, 60, told Reuters in an interview shortly after the verdict was read. Still, he vowed to appeal his conviction on the grounds that the judge did not allow him to mount a so-called “necessity” defense - that the protest was necessary to save the environment.

Ward said jurors told him following the verdict that they struggled with the case because they supported his position on climate change but could not find legal grounds to acquit him.

He was ordered to return to court on June 23 for sentencing on the burglary count, which carries a maximum punishment of 10 years in prison and $20,000 in fines.

A first jury weighing the charges against Ward deadlocked on both counts in February.

Skagit County prosecutors were expected to decide in the coming weeks whether to put him on trial a third time on the sabotage charge. Prosecutors did not immediately return a call seeking comment.

Ward has not disputed that he shut down a valve on Kinder Morgan Inc’s Trans Mountain Pipeline near Burlington, Washington, but maintains that his actions are necessary in the face of the government’s failure to address global warming.

Groups have also protested the nearly completed Dakota Access and Keystone XL pipeline.

Ward was arrested in October when he and other activists in four states cut padlocks and chains and entered remote flow stations to turn off valves to try to stop crude from moving through lines that carry as much as 15 percent of daily U.S. oil consumption.

Supporters have called his trial an “all hands on deck moment” for climate change activism.

Earlier this year President Donald Trump signed orders smoothing the path for those pipelines in an effort to expand energy infrastructure.

Officials, pipeline companies and experts said the protesters could have caused environmental damage themselves by shutting down the lines.