Philadelphia philanthropist H.F. "Gerry" Lenfest will donate up to $5.8 million to help save the SS United States, the storied ocean liner that's to be celebrated at a riverfront ceremony tonight, officials said.

The funds will be used to buy the ship from its owner, Norwegian Cruise Line, a subsidiary of Genting Hong Kong, and to maintain the vessel in its current South Philadelphia berth for up to 20 months. During that time, redevelopment and refurbishment plans will be completed.

The news was announced by the Washington-based SS United States Conservancy, which has worked for years to promote the ship and prevent its destruction. The group called Lenfest's donation "a major development in the effort to save the legendary American ocean liner."

The group wants to turn the ship into a historic attraction, permanently set on the waterfront of a major city.

The Lenfest donation has enabled the conservancy to enter into an exclusive purchase-option agreement with Norwegian, officials said.

"This is a game-changer in our work to save this irreplaceable American icon," said conservancy board President Susan Gibbs, granddaughter of the ship's designer, William Francis Gibbs. "Mr. Lenfest's vision and generosity give us a fighting chance to preserve the SS United States for generations to come."

She credited the ship's owners, who "turned down higher offers to partner with us in this patriotic effort."

The SS United States still holds the trans-Atlantic speed record, set 58 years ago on her maiden voyage from New York to England. The ship transported four men who were or who became U.S. presidents, along with countless heads of state, military, and business leaders. It also brought immigrants to these shores.

The ship has had numerous owners since being removed from service in 1969. Earlier this year, Norwegian began accepting bids from scrap firms, bringing new urgency to preservation advocates.

Lenfest has been interested in the project. Last year, he pledged $300,000 toward the purchase of the ship.

"Having established a relationship with the conservancy in 2009, Gerry Lenfest literally swept in at the 11th hour to save this national treasure," said Dan McSweeney, executive director of the organization. "Mr. Lenfest understands this ship is a symbol of American preeminence in the 20th century. She can also become a part of America's future promise, potentially creating thousands of jobs during and after refurbishment."

The conservancy holds the purchase option until February 2011. Once title is transferred, the Lenfest donation provides the conservancy with 20 months to begin development. The group wants to establish a public-private partnership to own and operate the ship.

"We are reaching out to potential partners in Philadelphia, New York, and beyond," Gibbs said. "The ship offers some 550,000 square feet of space to develop, and her interiors can be configured in a variety of ways."

Plans could include retail stores, restaurants, museums and entertainment venues.

News of Lenfest's donation is to be formally announced tonight, when the ship is lit during a ceremony on the Delaware River. People can gather at the IKEA store on Columbus Boulevard, across from the ship's berth at Pier 82. The 7 p.m. event, during which the funnels, bridge, radar mast and running lights will be lit, honors the 58th anniversary of the ship's maiden voyage.

"We are not out of the woods yet," McSweeney said. "Mr. Lenfest's donation has allowed us to triage the SS United States. Now comes the very challenging work of solidifying plans in New York or Philadelphia and that will take significant capital. . . . This is very far from the end of the story."