HONOLULU — A U.S. State Department agent who shot and killed a man in a Hawaii fast-food restaurant cannot be tried a third time, a U.S. judge ruled Friday.

Hawaii prosecutors may not proceed with a retrial against Special Agent Christopher Deedy, U.S. District Judge Derrick Watson in Honolulu ruled.

Deedy was in Honolulu providing security for the 2011 Asia-Pacific Economic Cooperation summit. After bar-hopping with friends on his first night in Waikiki, Deedy fatally shot Kollin Elderts during an altercation in a McDonald’s.

A 2013 murder trial ended in a hung jury. A second jury in 2013 acquitted him of murder but deadlocked on manslaughter.

Deedy testified at two trials that he was protecting others from the aggressive Elderts. Prosecutors say Deedy was drunk, inexperienced and fueled by warnings from a fellow agent that Hawaii locals are hostile toward federal workers and outsiders.

Watson’s ruling directs Hawaii officials to dismiss the case against Deedy and release him from his bail conditions. Watson is putting the dismissal requirement on hold until the all appeals have been addressed.

Deedy’s defense attorneys argued a third trial on manslaughter would violate the double jeopardy clause of the constitution. The Hawaii Supreme Court ruled that a retrial wouldn’t violate his double jeopardy rights and Deedy then turned to federal court to stop the state from taking him to trial for a third time.

“The State accordingly may not proceed with Deedy’s October 2018 retrial on reckless manslaughter or any included offenses without violating constitutional prohibitions,” Watson’sruling said.

The Honolulu Prosecuting Attorney’s office didn’t immediately comment on the ruling. It’s not clear if the office plans to appeal.

A spokeswoman for Elderts’ family said they are still processing the ruling.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.