A flat-12 is a 12-cylinder internal combustion engine in a flat configuration. Rarer, wider, and less tall than a V12, a flat-12 is used exclusively in mid-engined sports cars and rarely on production cars.
The engine has a naturally lower center of gravity than a V12, but must be mounted somewhat higher in the engine bay to provide clearance for the exhaust system (six runners on either side).
Flat-12 engines are generally not true horizontally opposed engines (boxer), but rather 180° V-engines. A true boxer has one crank pin per piston, while in the 180° V-engine, two opposing pistons share the same crank pin. The flat design was used in Formula One and Endurance racing. However, when wing-cars requiring air-flow venturis came along in the late 1970s, the wide, flat layout obstructed the airflow and became obsolete. In 1964-65, at the end of the 1.5 litre F1 era, Ferrari introduced a flat-12 on the Ferrari 1512 F1, but a more classical V12 was chosen for the new 3 litre F1. The Ferrari flat-12 design was successful and influential especially on Italian manufacturers, including Alfa Romeo, who were also successful in endurance racing with a flat-12. The Tecno Formula One flat-12 was a failure, however. A 4.4-5.0 L 180° flat-12 was later introduced by Ferrari in some of their production models, including the Berlinetta Boxer and Testarossa.
The Porsche 917 endurance racing car (introduced in 1969, for the Sport category) was powered by an air-cooled flat-12. This engine was an evolution of the Porsche flat-8 boxer engine and used identical cylinders to those found on the 908, but differed in that it used a V12 type crankshaft. The domination of the Porsche 917 over the V12-powered Ferrari 512 probably influenced Ferrari, because they returned to the flat-12 in 3 litre water-cooled form for their prototypes and Formula One cars.