GROTON, Conn. — A submarine that was damaged by fire at the Portsmouth Naval Shipyard is expected to return to service by the middle of 2015, after the replacement of cables, pipes and other scorched components, the Navy’s top officer said Wednesday.

Adm. Jonathan Greenert, chief of Naval operations, said the military concluded that the USS Miami can carry enough of a workload in the future to make it worth the cost of repairs, estimated at $450 million.

“She has 10 years left in her to meet her roughly 30-year service life. That’s at least five deployments,” Greenert said on a visit to Groton, where the submarine is based.

The fire broke out on May 23 while the nuclear-powered submarine was in dry dock at the shipyard in Kittery, Maine, for a 20-month overhaul. A former shipyard worker from Portsmouth, N.H., is accused of setting the fire.

It took more than 100 firefighters about 12 hours to put out the fire, which damaged forward compartments including living quarters, a command and control center and the torpedo room. It did not reach the back of the submarine, where the nuclear propulsion components are located.

Casey James Fury, 24, has been charged with setting the fire May 23 and a second blaze outside the sub on June 16. He is in jail pending trial in Maine.

The intensity of the blaze raised concerns about the integrity of the hull, which must withstand extreme pressure when the sub changes depths and travels deep underwater. But Greenert said a review of the hull revealed no major defects.

“We don’t see any major replacements to the hull plating,” said Greenert.

A Navy official told the office of Sen. Susan Collins, R-Maine, that engineers tested more than 1,000 points on the hull. Although the Navy concluded there is no need to replace large sections of the hull, some smaller portions could be replaced, an aide to Collins said.

The Navy told Collins’ office that it considered scrapping the Miami or returning it to the fleet with operational limits before deciding on the full-scale repair.

In a news release Wednesday, the Navy said the submarine will be ready to respond to any assignment from combatant commanders.

Greenert said the Navy is confident that the Miami can be overhauled for $450 million, plus or minus $50 million. An earlier estimate put the damage to the 22-year-old submarine at $400 million. It costs about $2.6 billion to build a new, Virginia-class attack submarine.

The Navy intends to fund the repairs by reallocating, or “reprogramming,” its own money and by asking Congress for additional money. The Navy is requesting $100 million to be reprogrammed for the current fiscal year and is seeking $150 million more for the next fiscal year.

Last month, the Navy announced its intent to enter into an agreement with Groton-based Electric Boat for advanced planning for potential repairs at the Portsmouth Naval Shipyard. Electric Boat will be among several contractors involved in the job, Greenert said.