With gold driving the local economy, a railway was needed and construction began from Melbourne in 1852. Initial progress was slow and was eventually taken over by the Victorian government in 1856. The importance of the line was seen in the design as a double track line, unlike most Victorian lines which are single track with passing loops.

The contractors and government tried to oppose the Stonemasons’ attempts to expand the application of the 8 Hour Day. Labour was in short supply and the Stonemasons won the eight hour day award in 1856 and stonemasons were needed in the construction of the rail line, especially in the railway overpasses. One bitter confrontation was between the Stonemasons and John Bruce, the contractor, at the Theatre Royal, Castlemaine, in 1860. Bruce was one of the biggest labour employers in the colony and was well known for reducing wages and delaying payment to increase his own profits. Masons from the German states had been brought to Victoria to work at half the wage. Few of the Germans ever worked on the line, after being welcomed and supported by the Stonemasons of their arrival.

John Bruce established a railway foundry in Castlemaine in 1860, at the former Steam Flour Mill (the building can still be seen at 107 Johnstone St.). There he manufactured rolling stock and railway plant, increasing his potential profits. Bruce died of “apoplexy” aged just 41.