(Reuters) - A Delaware judge said on Monday the former presidential yacht, the USS Sequoia, could be acquired by an investment group for zero dollars, ending a years-long dispute over the storied ship once used by John F. Kennedy.

U.S. presidents for decades entertained dignitaries on the 104-foot (32-metre) wooden Sequoia until it was sold by Jimmy Carter in 1977.

Washington attorney Gary Silversmith bought the yacht in 2000 and used it for private charters. In 2012, Silversmith borrowed $5 million from FE Partners LLC, which is backed by the Timblo family of India, to help fund needed repairs.

The loan set off years of legal wrangling while the historic vessel, built in 1926 in Camden, New Jersey, was neglected.

“The Sequoia, an elderly and vulnerable wooden yacht, is sitting on an inadequate cradle on an undersized marine railway in a moribund boatyard on the western shore of the Chesapeake, deteriorating and, lately, home to raccoons,” Delaware Judge Sam Glasscock wrote in his Monday ruling.

Silversmith sued in 2013 to block FE Partners from exercising its right under the loan to buy the yacht.

Glasscock ruled last year the lender had the right to purchase the ship for $7.8 million, minus various costs including the initial $2.49 million loan disbursement, because of a default on the loan. The two sides spent the past year fighting over the final deductions from the purchase price.

On Monday, Glasscock said the purchase option could be exercised for zero dollars, reflecting the extensive work required to make the Sequoia safe to use.

“We remain willing and able to pay off the lender, but unfortunately it appears that we will be denied that opportunity,” Silversmith said in an email, adding he was concerned the yacht was being acquired by foreign investors. “We are concerned that there is nothing to prevent the Sequoia from going overseas.”

But FE Partners General Counsel Richard Graf said in an emailed statement: “FE Partners is committed to restoring and preserving the Sequoia in cooperation with the U.S. Coast Guard so that future generations of Americans will be able to enjoy the storied past of this magnificent yacht.”