The BMW E12 is the first generation of 5 Series executive cars, which was produced from 1972 to 1981 and replaced the saloon models of the BMW New Class range.
Initial models were powered by inline-four engines, using either a carburettor or fuel-injection. A year after launch, the first model powered by a straight-six engine was introduced. By the final years of E12 production, most models used a straight-six engine.
There was no M5 model for the E12, however the E12 M535i is considered to be the predecessor to the M5. The E24 6 Series coupés were built on the E12 platform up until 1982. The E12 was replaced by the E28 5 Series in 1981, although the tools were sent to South Africa where E12 assembly continued (with E28 interiors) until 1984.