KITTERY, Maine (AP) — The Navy said farewell Friday to the USS Miami, the nuclear-powered submarine whose service was cut short when a shipyard employee trying to get out of work set it on fire, causing $700 million in damage.

The somber deactivation ceremony at Portsmouth Naval Shipyard marked the beginning of an inglorious end: Next year, the submarine will be towed to the West Coast to be cut up for scrap metal.

Rear Adm. Ken Perry, commander of the submarine Group Two in Groton, Conn., where the sub was based, acknowledged the disappointment over its premature retirement but told the crowd they were there to celebrate Miami and its crew members for nearly 24 years of service.

"This is a tribute," he said. "This is a celebration of the ship's performance and the superb contributions to the nation's defense and this is how we're going to treat it. So I expect to see some smiles out there."

Perry praised the ship's performance over more than a dozen deployments that included clandestine undersea warfare missions and back-to-back deployments in which it fired cruise missiles in Iraq and in Serbia, earning the nickname "Big Gun."

The audience included crew members and their families and seven former Miami commanding officers, including retired Capt. Tom Mader, the sub's first skipper.

At the end of the ceremony, the crew filed out of the auditorium after its top enlisted sailor, Chief Tyrus Rock, led them in a cheer, shouting out the first part of the ship's motto, "No free rides!" The crew finished by responding, "Everybody rows!"

Cmdr. Rolf Spelker, the Miami crew's current leader, said he came to Portsmouth thinking his assignment was to return the ship for service.

"They are no doubt disappointed and saddened that they can't take the ship out to sea," he said of his crew. "They have gone through the tidal wave of emotion."

After the fire, the Navy originally intended to return the ship to the fleet next year after extensive repairs. But it decided to scrap the submarine when estimated repair costs grew substantially above a $450 million estimate.

Story continues

Instead, shipyard workers will remove nuclear fuel and ship it to a federal repository in Idaho. They will make enough repairs so that the submarine can be towed to Puget Sound Naval Shipyard in Washington state, where it will be cut up for scrap. The estimated cost of the sub's inactivation is $54 million.

The Los Angeles-class submarine was damaged at the hands of a shipyard worker who set a fire in May 2012 while the submarine was undergoing a 20-month overhaul.

Seeking an excuse to leave work early, Casey James Fury set fire to a box of rags on a bunk, and the blaze quickly spread throughout the forward compartments. Fury pleaded guilty and is serving a 17-year sentence in federal prison.

It took 12 hours and the efforts of more than 100 firefighters to save the vessel. The fire severely damaged living quarters, the command and control center and a torpedo room, but it did not reach the nuclear propulsion components at the sub's rear. Seven people were hurt dousing the flames.

The Navy launched a series of investigations after the fire that led to recommendations, including installation of temporary automatic fire detection systems while submarines and other vessels are being repaired or overhauled.

___

Follow David Sharp on Twitter at https://twitter.com/David_Sharp_AP