There had been ideas about building such a line, important to the mining industry in the Upper Harz, for a long time. But the narrow Innerste valley posed major problems for a standard gauge railway. In 1874 the Magdeburg-Halberstadt Railway Company began work and bored a tunnel through the Gallenberg in Wildemann, which was finished in July 1875. Services to Clausthal started on 15 October 1877 and, in 1914, the line was extended to Altenau.