The attorney for a Portsmouth Naval Shipyard worker who is accused of setting a fire that caused $400 million worth of damage to a nuclear submarine said lawyers are discussing a “potential resolution” that would avert the need for a grand jury indictment, according to court papers.

Prosecutors say Casey James Fury, 24, of Portsmouth, N.H., admitted to setting the fire in May that damaged the USS Miami at the Portsmouth Naval Shipyard. They say he also confessed to setting a second fire, in June, near the submarine.

In federal court documents filed this week, a judge granted a motion by Fury’s lawyer to extend the timetable for prosecutors to seek a federal indictment of Fury. The date is now Sept. 26.

Public defender David Beneman said the time is needed to allow experts to review the case.

“Defense and government counsel have been meeting to discuss this case with an eye toward potential resolution without the need for a grand jury indictment,” Beneman said in his motion. “The magnitude of the fire damage, the volume of investigatory evidence, and the forensic arson evidence in this matter are voluminous, technical, and will consume large amounts of time and resources to consolidate, produce and review.”

He said that foregoing a grand jury indictment “will save substantial national resources extending beyond just court resources.”

Fury, a painter and sand blaster, told Navy investigators that he set the fires to get out of work because he was suffering from anxiety and having problems with his ex-girlfriend.

The blaze in May quickly got out of control and the steel hull trapped heat, causing superheated smoke and a stubborn fire that took more than 100 firefighters 10 hours to douse.

The submarine was undergoing a 20-month overhaul at the Navy shipyard in Kittery. The fire was confined to forward compartments and did not reach the back of the submarine where the nuclear propulsion components were located.

It remains to be seen whether the attack sub will be repaired or scrapped.