After many lines in central Germany had been electrified, the 2,800 kW E 17 was used there for the time being. However, these were shifted to the south when the important line between Munich and Stuttgart was also electrified. For this reason, the somewhat weaker E 04 was developed for the relatively flat routes in central Germany.
Like the E 17, the new locomotive was developed by AEG, but was given one less axle to accommodate the lower output. The now three powered axles were located with an asymmetrical wheelbase in the middle of the locomotive and were each connected to the motors directly above via a helical-spring gear. To carry the weight, a leading axle was attached under each end of the locomotive. The speed was initially set at 110 km/h, which was actually sufficient for the planned operations. After the E 04 09 reached 151.5 km/h on a test run with a load of cars, it and all other E 04s were approved for 130 km/h. The E 04 23, which was the last locomotive produced, was the only one to receive push-pull train controls a few years later.
23 examples were built, of which only two did not survive the Second World War. Due to their main area of application, 15 of the remaining vehicles came to the Reichsbahn of the GDR after the war, where they were used most frequently in front of passenger trains in the Halle and Magdeburg areas. The E 04 23 was used between Halle and Leipzig, where it benefited from its push-pull train controls. From 1970 they formed the class 204. Initially, the Bundesbahn had its home in Munich and later in Osnabrück. They became the class 104 in 1968 and remained in service until 1982.