From 1980, the Yugoslav Railways received a total of 53 four-car electric commuter multiple units. They came from Riga in the former Soviet Union and were called ЭР31 (ER31) by the manufacturer. Each train consisted of two control cars with traction motors on all axles and two non-powered trailers. In Yugoslavia, the control cars were designated as the series 412 and the trailers as the series 416. After the collapse of Yugoslavia they came to Serbia, Montenegro and North Macedonia. Six trains for the Bulgarian State Railways were only built after 1990.