The New Hampshire painter who set fire to a submarine so he could leave work early was sentenced to 17 years in prison and ordered to pay $400,000,000 today in U.S. District Court in Maine.

Casey Fury, 26, had already pleaded guilty to starting the May 2012 fire that caused $450 million in damage to the USS Miami while it was dry docked for an overhaul at Portsmouth Naval Shipyard in Kittery.

Fury spoke briefly in court, apologizing to the people who were hurt and saying he meant no disrespect to the Navy.

“From the bottom of my heart, I’m truly sorry for what I have done,” he said.

His lawyer, David Beneman, said Fury had suffered anxiety problems and “just freaked out” when he set the blaze, according to the sentencing memorandum he filed in federal court last week.

“Casey is exceedingly remorseful,” Beneman wrote. “He never intended anyone to be hurt or for the first fire to cause as much damage as it did.”

Beneman asked for 15 years and 8 months, the minimum amount of time Fury could receive.

Prosecutors said after the first fire, which injured five first responders as they battled the blaze for 12 hours in cramped quarters aboard the nuclear sub, Fury set a second smaller fire three week later on the dock, and later, signaled a false alarm by pulling a fire alarm.

Eric Hardy, a shipyard firefighter who suffered back and shoulder injuries fighting the blaze, called it the first fire the worst he had ever seen.

“The best way I could describe it, sir, is fighting a fire in a wood stove and climbing down a chimney,” Hardy told the judge.

Prosecutors asked for almost 20 years in prison.

“The ripple of consequences of the defendant’s conduct is far-reaching,” Assistant U.S. Attorney Darcie McElwee wrote. “The damage to Miami and its removal from the fleet, whether temporary or permanent, will continue to affect the United States Navy for years to come.”

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 Navy determined it was cost-effective to repair the vessel with a goal of returning it to service in the middle of 2015 but its future is now uncertain as repairs have been postponed under mandatory budget cuts known as sequestration.

Associated Press contributed