HONOLULU — The U.S. State Department special agent who fatally shot a man in a Waikiki McDonald’s restaurant has asked a federal court to prevent the state from taking him to trial a third time.

Christopher Deedy’s lawyer filed a petition in U.S. District Court Friday asking the court to declare any further prosecution a violation of Deedy’s constitutional right against double jeopardy.

The 33-year-old stood trial twice in state court for murder. He testified that he intentionally shot Kollin Elderts in November 2011 to defend himself and others. Both trials ended with juries unable to reach a verdict.

The jurors in the first trial ended their deliberations deadlocked eight to four in favor of finding Deedy not guilty of murder. They were not given the option to consider any other charge.

The jury in the second trial found Deedy not guilty of murder but deadlocked seven to five on manslaughter in Deedy’s favor. State Circuit Judge Karen Ahn acquitted Deedy of second-degree murder but ordered a third trial for manslaughter. Deedy appealed.

The Hawaii Supreme Court rejected all of Deedy’s double jeopardy claims and found that Ahn did not abuse her judicial discretion in ordering a third trial. Usually, there are no more appeals after the Hawaii Supreme Court because it is the highest authority for interpreting state law.

Deedy’s petition invokes a federal law that allows U.S. courts to get involved in state court proceedings if a person is held in state custody in violation of U.S. laws, treaties or the U.S. constitution.

Deedy argues that a third trial violates his U.S. constitutional right against double jeopardy. Deedy technically is still being held in custody by the state of Hawaii but is out on bail.

The third trial is scheduled for October.