The Navy has determined that it would be too costly to repair the amphibious assault ship USS Bonhomme Richard, which was gutted by fire in July, Navy Secretary Kenneth J. Braithwaite has announced.

“We did not come to this decision lightly,” Braithwaite said in a statement. “Following an extensive material assessment in which various courses of action were considered and evaluated, we came to the conclusion that it is not fiscally responsible to restore her.”

The ship caught fire on July 12 while it was docked at Naval Base San Diego. The blaze was not finally extinguished until July 16.

Ultimately, the Navy concluded that repairing the ship could cost more than $3 billion and take between five and seven years to complete, a Navy news release says. It would have also cost more than $1 billion to rebuild the Bonhomme Richard as another type of vessel, such as a hospital ship.

The Bonhomme Richard will be decommissioned and dismantled, the Navy announced.

“Although it saddens me that it is not cost effective to bring her back, I know this ship’s legacy will continue to live on through the brave men and women who fought so hard to save her, as well as the sailors and Marines who served aboard her during her 22-year history,” Braithwaite said.

Related: Photos show the damage sustained by the USS Bonhomme Richard during the fire

The last time the Navy deemed a vessel was deemed too costly to repair was following the 2012 fire aboard the Los Angeles-class submarine USS Miami, which caused up to $700 million worth of damage. A shipyard worker was later sentenced to prison for allegedly setting the fire so he could go home early that day.

At the time of the fire, the Bonhomme Richard’s flight deck was being upgraded so it could handle F-35Bs, which are replacing the AV-8B Harrier and other Marine Corps aircraft.

Chief of Naval Operations Adm. Michael Gilday later told Navy leaders that 11 of the ship’s 14 decks had been damaged, Defense News reporter David Larter first revealed.

In August, a defense official confirmed that a sailor was being questioned in connection with the massive fire. Investigations into the fire remain ongoing, according to the Navy.

With the loss of the Bonhomme Richard, the Navy will be left with nine remaining amphibious assault ships.

“It’s a huge set back, said retired Navy Capt. Jerry Hendrix, who works as a defense consultant.

Not only will the Marine Corps’ efforts to put F-35B’s on amphibious assault ships be delayed now, but all the money that was invested in overhauling the ship “went up in smoke,” Hendrix told Task & Purpose on Monday.

But it is the time that was spent on updating the Bonhomme Richard that can truly never be recovered, he said.

“The clearest lesson here, in terms of planning for the next war, isn’t that our ships are fragile (all ships are fragile in a missile age) but that we have no excess capacity to repair or replace ships damaged or lost in battle,” Hendrix said. “That is the true strategic lesson of the BHR (Bonhomme Richard).”