The Mazda 787 and its derivative 787B were Group C sports prototype racing cars built by Mazda for use in the World Sportscar Championship, All Japan Sports Prototype Championship, as well as the 24 Hours of Le Mans from 1990 to 1991. Designed to combine a mixture of the Fédération Internationale du Sport Automobile (FISA) Group C regulations with the International Motor Sports Association (IMSA) GTP regulations, the 787s were the last Wankel rotary-powered racing cars to compete in the World and Japanese championships, using Mazda's R26B engine.
Although the 787 and 787B lacked the single lap pace of World Championship competitors such as Mercedes-Benz, Jaguar, and Porsche, as well as Japanese Championship competitors Nissan and Toyota, the Mazdas had reliability which allowed them to contend for their respective championships. The reliability of the cars eventually paid off in 1991 when a 787B driven by Johnny Herbert, Volker Weidler, and Bertrand Gachot went on to victory in the 1991 24 Hours of Le Mans. This remains as of 2013 the only victory by a Japanese marque as well as the only victory by a car not using a reciprocating engine design.
A total of two 787s were constructed in 1990, while three newer specification 787Bs were built in 1991