The man accused of "swinging a knife" and assaulting officers at the Groton submarine base Thursday evening will remain in federal custody until a detention hearing scheduled for noon Wednesday.

According to a spokesperson for the Navy, Gary Ray Brunache, 35, of Norwich, showed up to the base armed with a knife Thursday evening, prompting an officer to open fire. One Navy civilian officer was caught in the crossfire and a second was stabbed in the leg.

Brunache, who said he went to the base to see his brother, walked from Norwich to the Navy base around 7 p.m. Thursday. He became frustrated when officers at the main gate on Crystal Lake Road wouldn't let him in and began "swinging a knife" at Officer Brian McCarthy, according to the NCIS officer who filed a complaint against him.

Officer William Kephart fired pepper spray at Brunache, who stabbed Kephart in the leg, NCIS officials said. McCarthy fired three rounds and missed, but officers "eventually subdued" Brunache.

Kephart suffered a stab wound to the leg and McCarthy, who was caught in a spray of bullets, were taken to the hospital for treatment of non-life threatening injuries. Both officers were released around 10:30 p.m., according to the Navy.

Groton Town Police apprehended Brunache, who was not injured, and brought him to a local hospital for a medical evaluation.

He has been charged with assault on a federal officer and assault with a dangerous weapon on a Navy base. Brunache remains in the custody of the Naval Criminal Investigative Service.

Brunache worked at the Mohegan Sun Casino in Uncasville in 2002, according to a casino spokesperson.

The main gate to the submarine base, which was closed to traffic through the night, reopened Friday morning.