[2]: 128–130 However, he did gain election to Bradford City Council that year, representing Manningham, and held his seat for over a decade.
[4] Hartley was intended as the ILP candidate for the 1902 Dewsbury by-election, with the support of the local trades council and the Labour Representation Committee, but the rival Social Democratic Federation (SDF) nominated Harry Quelch.
Angered by what he saw as pandering to the right-wing of the labour movement, Hartley actively supported Quelch's candidacy and joined the SDF.
Sitting MP Ramsay MacDonald had persuaded the Labour Party not to stand a candidate, in the hope of a Liberal victory, but this enabled Hartley to attract the support of many ILP members, ultimately taking 11.4% of the vote.
[6] On the outbreak of World War I, Hartley became strongly pro-war and left the SDF to join the British Workers League, in the process losing most of his political support.