The Thalbahn Habsheim ran through Dietwiller. It was a 24.6 km (15.3 mi) long narrow-gauge railway with a gauge of 600 mm (1 ft 11+5⁄8 in). It was built during World War I by German soldiers and Romanian prisoners of war as a military light railway. Many prisoners of war died due to malnutrition, forced labor and the poor living conditions and were buried in the Romanian cemetery in Dietweiler.[4]