From Ferrari Wiki
After boycotting Sports car racing in 1968 to protest the rule change that also banned their 4 litre Ferrari 330 P4, Ferrari built another 3000cc prototype in 1969, named the 312 P. The 3.0 V12 Ferrari 312P was hardly more than a 3-litre F1 Ferrari 312 with open Barchetta, or later closed top prototype Berlinetta body.
Despite building three chassis in total, Ferrari usually entered only a single car in a few races which faced a fleet of factory and privateer Porsche 907 and Porsche 908 plus old 5-litre cars like the Lola T70 and the improved Ford GT40 Mk.I of John Wyer. The 312P was fast, but the half-hearted attempt of Ferrari, which was not enough to score a win against more determined opposition. Ford's direct counterpart, the Ford P68 with the Cosworth F1 engine, had been a total failure in 1968, and was retired in early 1969.
At the 12 Hours of Sebring the Spyder finished 2nd to a JWA Gulf Ford GT40. At the BOAC 500km in Brands Hatch the same spyder was 4th behind three Porsche 908-01. At 1000km Monza, Chris Amon took the pole with the 312P spyder, ahead of Jo Siffert's 908-01, but had to retire. The 312P was not entered at the second Italian race, the Targa Florio, and had to retire in the German 1000 km Nürburgring where the Porsche 908/02 dominated. At the 1000km Spa, a 312P was second behind the Siffert/Redman 908-01LH. Two 312P were entered the 1969 24 Hours of Le Mans, now as low-drag Berlinettas. They were 5 and 6 on the grid, but didn't finish.
During the 1969 season, the appearance of the Porsche 917 had, despite teething problems, made clear that only a similar new 5-litre car would be able to challenge it. Since mid-1969, Ferrari spent some of the millions earned in the Fiat deal for the construction of the required series of 25 new 5-litre V12 sports cars. At the end of the season the two remaining 312P were sold to N.A.R.T., the American Ferrari importer of Luigi Chinetti, as the factory would rely on the big Ferrari 512S in 1970. With NART, the 312P were mainly run in America, but they returned for the 1970 24 Hours of Le Mans, were only one car was raced, and no less than eleven 512. The 312P, facing competition of Porsche, Alfa, and Matra in the 3 litre prototype class, was off pace, but at least it was among the 16 cars still running at the end.
At that time, Porsche had already collected a lot of experience with the fast but not well handling 917, and based on that decided to improve also their small Porsche 908 which would win on twisty tracks like the Targa in 1970, and the Nürburgring in 1970 (and 1971), while Ferrari had no nimble 3-litre in 1970 to support their fleet of 512s.
As it was known in 1970 that the 5-litres would be banned after 1971, Ferrari abandoned the 512 after only one season, and tested a new design in a few 1971 races, the Ferrari 312PB based on the new flat-12 F1 engine, in order to challenge for the championship in 1972. Alfa did the same, yet their Alfa Romeo Tipo 33 scored three World Championship races.
Since 1967, the once dominant Scuderia Ferrari had only won one World Championship sports car race, and had also missed new developments, like the emergence of professional teams funded by sponsors, both in F1 and sports cars. The Wyer-Gulf and Martini teams raced Porsche models while the Zuffenhausen factory could concentrate on development without committing too much money and personnel to cover international racing events.