PORTLAND — Federal prosecutors are recommending that a New Hampshire man be sentenced to nearly 20 years in prison for setting fire to a nuclear-powered submarine last year at the Portsmouth Naval Shipyard in Kittery, causing an estimated $450 million in damage.

His defense attorney is asking that the sentence be less than 16 years.

In a memorandum filed Friday in U.S. District Court, the U.S. Attorney’s Office recommends the top of the sentencing range allowed under an agreement in which Casey James Fury pleaded guilty to setting fire to the USS Miami.

Prosecutors want him to serve 19 years and seven months, the maximum allowed under the agreement.

Fury’s federal public defender, David Beneman, filed a document Monday asking for a sentence of 15 years and eight months, the minimum allowed under the agreement.

Fury, 25, is scheduled to be sentenced Friday in federal court in Portland. He pleaded guilty in November to setting the fire in the sub on May 23, and a second fire outside it on June 16.

Fury told Navy investigators that he set the fires because he was feeling anxiety and wanted to go home, according to prosecutors. The fire on June 16 was doused quickly, causing no damage.

It took more than 100 firefighters to save the USS Miami after the fire on May 23 spread while the sub was in dry dock.

The fire injured at least five people who responded to it and could easily have been fatal, prosecutors wrote in the court document. The fire also cost the United States the use of a “vital national asset” for 18 months beyond the scheduled maintenance period, they said.

In his memorandum, Beneman asked for a shorter sentence because of Fury’s remorse, lack of intent to cause such extensive damage, anxiety and depression, young age, low risk of reoffending and other factors.

Under federal guidelines, the length of Fury’s sentence is based primarily on the extreme monetary value of the fire damage, Beneman said.

The Navy plans to repair the Los Angeles-class nuclear submarine, but prosecutors said those efforts have been put on hold because of mandatory federal budget cuts.