Updated

A shipyard worker who set fire to rags aboard a nuclear submarine because he wanted to go home was sentenced to a little more than 17 years in federal prison Friday for the blaze that transformed the vessel into a fiery furnace, injured seven people and caused $450 million in damage.

Casey James Fury also was ordered to pay $400 million in restitution.

The judge imposed the sentence under a plea agreement that limited his time in prison to roughly 15 to 19 years for arson.

The 25-year-old Fury, formerly of Portsmouth, N.H., pleaded guilty to setting the May 23 fire while the submarine was undergoing a 20-month dry dock overhaul at Portsmouth Naval Shipyard in Kittery.

The civilian painter and sand blaster told authorities that he needed to go home because he was suffering from an anxiety attack and had no more vacation or sick leave. He said he never envisioned such extensive damage when he used a lighter to set fire to a plastic bag of rags that he left on a bunk in a state room.

The blaze quickly grew into an inferno spewing superheated smoke that billowed from hatches. It took 12 hours for more than 100 firefighters to save the submarine.

Seven people were hurt, the Navy has said.

Fury, who had been working in the torpedo room, fled to the safety of the pier and watched as firefighters went down hatches and into the burning Los Angeles class-attack submarine, staying inside for only minutes at a time because of the blistering heat.

About three weeks later, Fury set a second fire outside the crippled sub, again because he wanted to go home because of anxiety. That fire caused little damage. He pleaded guilty to two counts of arson in November.

Prosecutors said it was telling that he tried to set a second fire after the extensive damage caused by the first one.

But the defense contends Fury suffered from depression and anxiety and that he never intended to harm anyone.

The first blaze damaged forward compartments including living quarters, a command and control center and the torpedo room. It did not reach the rear of the submarine, where the nuclear propulsion components are located.

The fire's intensity raised concerns about the integrity of the hull, which must withstand intense pressure at extreme underwater depths. Metallurgists who examined the

But its future is now uncertain. Repairs have been postponed under mandatory budget cuts known as sequestration.