Story highlights

The fire did extensive damage to the dry-docked USS Miami

Two sailors and five firefighters were hurt fighting the 12-hour blaze

Casey James Fury told investigators he was trying to get out of work

CNN  — 

A shipyard worker in Maine pleaded guilty to arson Thursday for setting a fire that did $400 million in damage to a U.S. nuclear attack submarine.

Casey James Fury admitted to two counts of arson in connection with the May 23 blaze aboard the USS Miami and a smaller fire beneath the dry-docked submarine in June, according to court papers. The 24-year-old civilian painter and sandblaster at the Portsmouth Naval Shipyard told investigators that he started the fires because he was having extreme anxiety and was trying to get out of work, the documents state.

Sentencing has been set for March 8. Fury could face up to life in prison on the charge.

Fury was accused of setting fire to a plastic bag full of cotton rags in a cabin in the forward end of the Miami, starting a conflagration that took the ship’s crew and firefighters from the shipyard and nearby towns 12 hours to put out. Five firefighters and two sailors were injured during the effort.

The fire damaged crew quarters and command-and-control spaces aboard the submarine, the Navy said at the time. The damage was forward of the nuclear reactor that powers the vessel, which had been shut down and was closed off after the fire began, the service reported.

The 362-foot Miami was commissioned in 1990 and had been undergoing an extensive overhaul at the Portsmouth shipyard. The Navy says it plans to repair the submarine and return it to service.

CNN’s Christine Theodorou contributed to this report.