To replace the last steam locomotives on secondary lines, the MÁV needed a powerful diesel locomotive with a low axle load. To stay within the weight limits, Ganz-MÁVAG selected hydraulic power transmission, what led to the asymmetric centre-cab prototypes of the type M46. This was not selected for mass production for MÁV, but from it the more powerful, dual-cab M41 was developed.
They got a license-built Pielstick engine with 1,800 hp and a Voith transmission. Train heating was electrically. Between 1972 and 1984, 107 were delivered to MÁV. Additionally, the GySEV received seven more and the Greek OSE eleven. As early as in the eighties, the MÁV rebuilt them with a more modern variant of the original engine and other improvements.
Their importance sunk with the electrification of many lines in Hungary from the year 2000. But between 2002 and 2008, 35 received a modern engine either from MTU or Caterpillar. They received the new class number 318 in 2011, but in 2016, a large number was scrapped. In Greece, the last one had already been withdrawn in 2005.