Regarded as one of the greatest Ferraris, the 1962 Ferrari 250 GTO Berlinetta went under the hammer at Bonhams in Carmel, California. A huge crowd applauded at confirmation of the price.
It beat the auction record for a car set at Bonhams' Goodwood Festival of Speed in Sussex last year, when a 1954 Mercedes-Benz W196 R F1 Racer sold for about £18m.
The GTO was the 19th of the 39 built and had been owned by the Violati family since 1965. They raced the car, which was wrecked in a crash in 1962 when its driver, former French ski champion Henri Oreiller, was killed.
Ferrari repaired the car and it continued to race until the first decade of this century. Bonhams chairman Robert Brooks said it had been a "genuine privilege" to represent it.