On 11 September 1897, Compton's father died, and he succeeded as the Marquess of Northampton, thereby forfeiting his seat in the House of Commons and necessitating a by-election.
Ultimately, the party nominated Joseph Walton, a County Durham-based owner of collieries and coal and coke merchants.
After a struggle to find a candidate, the party selected James Blyth, a London-based captain in the Oxfordshire Light Infantry and a friend of Wakefield MP Lord Milton.
He was a member of the Fabian Society and of the Social Democratic Federation, and had stood in Barrow in 1895, coming bottom of the poll.
[3] By far the largest employer in the area was the coal industry, and Barnsley was a stronghold of the Yorkshire Miners Association (YMA).
Although he was not part of the Lib-Lab movement, Walton courted the support of local miners, and the YMA quickly gave him its backing.
He said in the presence of Walton that he would favour a labour party at a time when state payment of MPs, and of election expenses would enable working men to be maintained in Parliament.
Ultimately, the defeat led to a re-evaluation of its approach, and to adopt instead a short-term policy of uniting all trade unions, socialist or not, into one political party.