Howard Hughes’ legendary Spruce Goose, a gigantic wooden airplane whose fate was uncertain amid a financial dispute, will remain permanently in Oregon.

The Evergreen Aviation and Space Museum has reached a deal with the Aero Club of Southern California to take full ownership of the plane in the coming weeks, California attorney Robert E. Lyon said. Lyon, who represents the Aero Club, said the agreement was reached in early July.

The McMinnville, Oregon-based nonprofit has been home to the Spruce Goose for more than two decades, but it still owed a payment to the California club from which it bought the plane.

The dispute centered on the original purchase terms, which in addition to the $500,000 price tag also included a percentage of the museum’s earnings from displaying the Spruce Goose. The final details of the agreement weren’t disclosed.

"It's comforting to know it will finally be in its resting place where it will be properly taken care of," Lyon said.

Dubbed the "flying boat," the Spruce Goose has a 320-foot wingspan and floats that allows it on land and water. It was originally envisioned as part of a fleet of flying boats that would potentially deliver cargo and troops over the heads of U-boats during World War II.

The Spruce Goose was built in 1947 by Hughes with $18 million in federal funds. Hughes, an oil and film industry mogul, also spent $7 million of his own money on the endeavor. The plane was made almost entirely of birch wood – a material that wasn’t crucial to the war effort.

Hughes only flew the plane once – Nov. 2, 1947, in a mile-long test flight about California’s Long Beach Harbor.

Hughes then stored the craft in a special hangar and never flew it again. After his death in 1976, the Smithsonian briefly contemplated cutting up the plane and putting its pieces on display. But aviation enthusiasts protested and vowed to keep the legendary plane intact, said Lyon, who remembers as a boy seeing the airplane’s giant wings trucked from Culver City to Long Beach in 1946.

The Aero Club of Southern California acquired the aircraft, he said, and put the Spruce Goose on display in a hangar.

In 1992, the Spruce Goose was sold to Delford Smith, the founder of Evergreen International Aviation. The plane was transported to McMinnville in pieces by truck and barge, reassembled and restored by a team of experts.

Smith founded the museum in 2001, with the Spruce Goose as its centerpiece housed in a giant glass and steel building.

In recent years, the museum was embroiled in a state investigation of the bankruptcies of Evergreen Aviation and Evergreen Vintage Aircraft, a for-profit affiliate of the museum that owned its real estate and many of its planes.

But the state said it won't take enforcement action against the nonprofit. A settlement reached in May resolved both bankruptcies and secured several of the museum's airplanes and its real estate.

The Associated Press contributed to this report.