The Mercedes-Benz W196R F1 car driven by Juan Manuel Fangio in 1954 has been sold for a record-breaking US$29 million ($32 million) at the Goodwood Festival of Speed.

The unprecedented price tag makes the 59-year-old racer the most expensive car ever sold at auction and the most valuable Mercedes-Benz in the world.

Fangio drove the car to wins in both the German and Swiss Grands Prix in 1954, giving Mercedes its first back-to-back post-war wins, as well as introducing F1 cars to fuel injection, tubular spaceframe chassis and inline eight-cylinder engines.

Bonhams chairman Robert Brooks called this car the "most important historic Grand Prix racing car ever offered for sale".

"I have handled some of the world's most desirable and important motor cars during a motoring auction career spanning five decades, but I have reached a peak today with this legendary Grand Prix car," Brooks said.

The Mercedes W196R almost doubled the previous automotive auction record, a 1957 Ferrari 250 TR Prototype that sold for $16.39 million ($18 million) at Gooding & Company's Pebble Beach auction in 2011.

It also came close to the record price for a car sold privately. The recent big seller was the 1962 Ferrari GTO built for Stirling Moss, which sold for US$35 million ($38.6 million) in a private sale last year.