In the 19th century railwaymen found it difficult to organize into trade unions. In 1865 men working on the Great Western Railway attempted to form a Railway Working Men's Provident Benefit Society but it was quickly destroyed when its leaders were sacked by the company. In the next thirty five years there were ten new railway unions were started but many of these failed to survive more than a couple of years. The most successful of these was the Amalgamated Society of Railway Servants (ASRS) that was established in 1871 and the Amalgamated Society of Locomotive Engineers and Firemen (ASLEF) in 1880.
By 1890 the total number of trade unionists on the railways was about 48,000 out of a total work force of 381,000. Numbers continued to grow and by 1910 it had increased to 116,000, two-thirds of whom were in the ASRS and about one-sixth in ASLEF. In 1913 the National Union of Railwaymen (NUR) was formed by the amalgamation of the ASRS, the United Pointsmen and Signalmen's Society and the General Railway Workers Union.
The most important figure in these negotiations was Jimmy Thomas, the Labour MP for Derby. Although still a member of the House of Commons, Thomas was elected General Secretary of the NUR in 1917 and two years later led a successful railway strike. When Ramsay MacDonald became Prime Minister after the 1924 General Election, he appointed Thomas as Secretary of State for the Colonies. He was expelled from the Labour Party after he joined MacDonald's National Government in 1931.