The Ferrari 312PB was a Group 6 Prototype-Sports Car introduced in 1971 by Italian carmaker Ferrari. It was officially designated the 312P, but often known as the 312PB to avoid confusion with a previous car of the same name. It was part of the Ferrari P series of Prototype-Sports Cars but was redesignated as a Group 5 Sports Car for 1972.
In 1970, a change in the regulations for sportscar racing for 1972 was announced. The loophole for the big 5L sports cars (such as the Porsche 917 and Ferrari 512) was closed, and the minimum weight of the 3L prototypes was raised to 650 kg (1,433 lb).
Porsche considered this too heavy as their Porsche 908/03 were 100 kg (220 lb) lighter, and this advantage would have been lost. On the other hand, their aircooled two-valve engine was low on power with 370 hp (276 kW), and the development of a new engine would have been necessary. Thus, Porsche did not enter world championship sports car races after 1971 and sold the 908s to customers who would have to add weight to them. Matra and Alfa Romeo were willing and able to compete, but only in selected seasons or events. Also, Ford's successful Formula 1 Cosworth-V8 engine was available for independent chassis builders, but vibrations made it unreliable for endurance racing.
After having been beaten by the Porsche 917 in 1970, Ferrari abandoned further development of the Ferrari 512M, leaving the 512 to customer teams like Penske Racing, which had some success with their improved 512M in 1971, though. Penske, probably not very happy about the lack of support from the factory, joined Porsche for their Can-Am effort with the turbocharged Porsche 917/10.
Instead, in 1971, Ferrari focused on a new 3.0L prototype based on the 180° flat-12 boxer from the 312B F1 car. Officially this design was known as 312P, the motorsports press appending the B to avoid confusion with the earlier 312P V12 cars. This design was similar to the traditional Porsche engine layout with its low center of gravity, but Ferrari used water-cooling and 4-valve heads. The car was promising, but did not win, while the similar Alfa Romeo 33 scored two wins against Porsche's dominance.
In 1972, with only Alfa answering the challenge, the 312PB was very successful and won all World Sportscar Championship races in which it was entered. Ferrari skipped the 1972 24 Hours of Le Mans, though, as the F1-based engine would not last 24 hours and surely spoil their otherwise perfect record.
In 1973, Matra which had previously focused on Le Mans also challenged for the championship while Alfa was absent. As Matra won several races, Ferrari needed to enter in the 1973 24 Hours of Le Mans, with an improved yet still doubtful engine. One car was used as a "hare" which supposed to lure the Matras into driving faster laps than they intended, to test their reliability. Ironically it was only the "hare" Ferrari which survived the 24 hours, finishing a respectable second behind a Matra. The championship saw the same order, with only two Italian wins compared to five French. In addition, despite the absence of the Matras, the 312PB could not defend the 1972 win of the Targa Florio as the prototypes of Ferrari and Alfas failed and a Porsche 911 collected a surprise win.
At the end of the 1973 season, Ferrari abandoned sports car racing to focus on F1 again, as the F1 team had even skipped GP races in 1973 due to lack of competitiveness.