Before World War One the German railway system was a collection of different companies each serving the particular state that they were in, run autonomously to each other. In 1918 the German Empire fell, and the country became a republic. This lead to the railway system being nationalised.