New York (AFP) - The painted upright piano that adorned Rick's Cafe in the classic movie "Casablanca" fetched $3.4 million at auction after a frenzied sale in New York.

The orange piano -- on which Sam (Dooley Wilson) famously plays "As Time Goes By" at the request of his one-time love Ilsa (Ingrid Bergman) -- was among 200 items from Hollywood's golden age that went under the hammer at Bonham's in New York on Monday.

The piano featured prominently in the Oscar-winning 1942 romantic drama, with leading man Humphrey Bogart using it as a hiding place for the letters of transit that ultimately secure his former lover's safe passage to the United States.

Dresses worn by Grace Kelly, Marilyn Monroe, Judy Garland and Rita Hayworth were also auctioned, as well as a jacket worn by Clark Gable in "Gone With the Wind."

The Lion costume worn by Bert Lahr in "The Wizard of Oz" was also put up for sale.

Auctioneers had declined to estimate the Casablanca piano's likely price, saying only that they expected it to fetch "the low- to mid-seven figures."

Bidding opened at $1.6 million and escalated rapidly before closing three minutes later at $3.4 million including taxes.

The piano was specially adapted to allow Bogart's character to perform his sleight of hand with the transit papers, hiding them in plain sight of the clientele at Rick's.

The writers decided that the papers should be stashed in the top of the piano, but had to alter its lid to make it work on camera.

"The only way this works, however, is if the lid opens from the rear, otherwise Rick would have to reach over Sam's shoulder to hide the papers, a hardly subtle move," the auction house said.

"The solution to this staging problem was to have the prop department completely remove the top of the piano, leaving the piece secured by a hook and eye only."

- Chewing gum included -

Most likely made in 1927, the piano also has only 58 keys, 30 fewer than a classic piano.

It had been owned by a dentist in Los Angeles since the 1980s.

Story continues

Bonham's said the painted Moroccan designs were restored about three decades ago under the direction of Warner Bros.

The piano was offered for sale with a signed photograph of actor Dooley Wilson and a copy of "Casablanca," and even came with a wad of petrified chewing gum found stuck beneath the keyboard. A faint outline of a fingerprint could be seen on the gum, but its owner was unknown.

A winner of three Academy Awards, "Casablanca" is ranked as the second greatest movie of all time by the American Film Institute, behind "Citizen Kane" and just ahead of "The Godfather."

Items related to the film generated snappy business at Bonham's, with a draft screenplay entitled "Everybody Come to Rick's" fetching $106,250, well above its $40,000-$60,000 estimate.

The doors featured in the entrance of Rick's Cafe sold for $115,000, having been estimated at $75,000 to $100,000.

The famous letters of transit at the heart of the film, estimated at between $100,000 and $150,000, sold for $118,750. One of the chairs from Rick's Cafe fetched $5,000.

Several dresses featured in other movies fetched hefty sums as well, including a gown worn by Garland in "Easter Parade" that sold for $11,875 and another worn by Barbra Streisand in "The Way We Were" that earned $8,750.

A gown worn by Hayworth in "The Loves of Carmen" fetched $6,000.

However, a dress worn by Grace Kelly in "Mogambo" estimated to be worth between $15,000 and $20,000, failed to secure a buyer at the auction.