The bull market in vintage racing cars recently gained an eye-opening data point: A 1958 Ferrari 335S that had been bailed out of a United States Customs warehouse in New York for $1,000 in 1963 was sold for $21.5 million in a private transaction to an Austrian collector, Andreas Mohringer.  Although the price did not set an absolute record — a Mercedes-Benz Grand Prix car of the same era sold at auction for $29.7 million last year — it was an impressive return on investment. No sale of an automobile in recent memory has realized a percentage gain that compares.  The sale, in the final days of 2013, was disclosed by a person with direct knowledge of the transaction, speaking on the condition of anonymity because of the demand for discretion in the high-stakes business of historic car collecting. Setting aside the miscellaneous expenses involved in maintaining the car over the last 50 years, the increase in value amounts to thousands of percent.  Since the Customs officials lightened their inventory, the Ferrari had owners in Maryland, Britain, Japan and then Seattle. For a few years, its factory-installed V12 engine sat in Greenwich, Conn., while the rest of the car traveled the globe.  The story of how this 335S became the wandering Ferrari begins in May 1957, when Alfonso de Portago crashed a similar purpose-built racing model near Guidizzolo, Italy, during the Mille Miglia race. The fatalities included not only de Portago, his co-driver and nine spectators, but also the event itself, which had provided Ferrari a showcase for marketing its road cars to private owners.  Three of the four Ferrari factory’s entries were 335S models. De Portago’s car, which used a 3.8-liter V12, was of the 315 series; aside from the engine size the cars were more or less identical, and all, while licensed for road use, were minimally modified racecars. At the time, Enzo Ferrari was focused on competition, and the income from the sale of such cars was vitally needed.  With the Mille Miglia gone and a rules change that limited entries for the 1958 World Sports Car Championship to 3-liter engines, the 335S, which had a 4.1-liter V12, was orphaned. Now, with an engine too big for international competition and too complicated for most private teams — it had four overhead camshafts, six carburetors and 24 spark plugs — Ferrari made the best of the pieces left over from the short model run, building a final car and shipping it to Luigi Chinetti, its distributor in the United States.  This car was sold to Alan Connell, a Texan active in Sports Car Club of America racing. Connell drove his 335S in 1958 and part of 1959, but the engine was troublesome, and the car went back to Italy for repairs. The bill is reported by Ferrari historians to have been on the order of $70,000.  When the car arrived back in New York, Chinetti didn’t want it, and Connell pointed out that a new car cost about $12,000, so there was little sense in retrieving this one. The car languished in a Customs warehouse.  That’s where Gordon Tatum, a Maryland auto dealer, found it. He paid the storage fee of $1,000 and took it home. From Tatum the car went to owners in Britain and Japan, and in the early 1990s it was acquired by Bruce McCaw of Seattle, who displayed the car and drove in vintage racing events including the Monterey Historics in California.  Now reunited with its original engine and after a stop at the Cavallino Classic show in Palm Beach, Fla., last month, it is headed back to Europe.  A version of this article appears in print on February 23, 2014, on page AU3 of the New York edition with the headline: Cost $1,000, Sold for $21 Million. Order Reprints|Today's Paper|Subscribe
A 1958 Ferrari 335S was sitting in a U.S. Customs warehouse when a car dealer rescued it in 1963 for the price of the storage fee. Last year, the car’s new owner hit the jackpot.