Even in New Labour’s pomp, there was one place where the S-word was permitted. “The Labour Party is a democratic socialist party,” read the inscription on members’ cards. In common with corporate slogans (“fair and balanced”, “don’t be evil”), this was a message designed to obscure reality, rather than reflect it. Labour has never been a socialist party. That is to say, it has never been committed to the replacement of capitalism as opposed to its reform.

But Labour, as Tony Benn laconically remarked, “has always had socialists in it”. This observation forms the title of writer and activist Simon Hannah’s history of the party’s left. Jeremy Corbyn, it is often said, has returned Labour to “its socialist roots”. Yet Hannah notes that from the party’s inception in 1900 onwards, the left struggled – and largely failed – to achieve supremacy. The Marxist Social Democratic Federation, the Socialist League of the 1930s, the Bevanites of the 1950s and the Bennites of the 1980s were all divided or defeated.

Keir Hardie, Labour’s revered first leader, dismissed “every ism that isn’t Labourism”. He saw the party as a vehicle for the advancement of the working class, not for the wholesale transformation of the economy. For much of Labour’s history, trade union leaders wielded their powerful block vote against the left’s policies and candidates (not least in Benn’s 1981 duel with Denis Healey). Only recently, through the left’s ascendancy in the union movement, has the balance of power changed.

In government, when forced to choose, Labour deferred to capital. Philip Snowden, who served as chancellor in the 1924 minority administration, declared: “We must show the country that we [are] not under the domination of the wild men.” He would later impose punitive austerity measures during the Great Depression. Labour’s first prime minister, Ramsay MacDonald, split the party and entered government with the Conservatives.

A parallel episode unfolded in 1976 when Jim Callaghan and chancellor Healey accepted a £2.3bn bailout from the International Monetary Fund and the public spending cuts it entailed. The Alternative Economic Strategy advocated by the Bennite left – public investment, nationalisation of the banks, import controls – was unambiguously rejected, paving the way for Thatcherism (“We used to think you could spend your way out of recession… that option no longer exists,” remarked Callaghan).

In foreign and defence policy, the left’s defeats were still greater. The party’s pacifist leader George Lansbury was, in the words of Hugh Dalton, “hammered to death” at the 1935 conference by trade union general secretary Ernest Bevin. As foreign secretary in the Attlee government, Bevin would insist that Britain acquired its own nuclear bomb (“we’ve got to have a bloody Union Jack on top of it”). And it was Clement Attlee who, in secret from most of the cabinet, approved the development of Britain’s nuclear weapons programme.

Even Nye Bevan (who resigned from the government in 1951 in protest at the introduction of prescription charges to fund the Korean War) defeated a 1957 unilateralist conference motion by warning delegates not to send a foreign secretary “naked into the conference chamber”. This, Hannah writes, “provides one of the most salutary and essential lessons for the Labour left – never rely on a single leader, especially one with the extraordinary pressure of parliamentary politics bearing down on them”.

After Benn’s failure to become deputy leader in 1981, and his landslide defeat to party leader Neil Kinnock in 1988, the left entered the wilderness. In the 1994 leadership election, Hannah notes, no socialist candidate stood: “They [Blair and his allies] had indoctrinated the left in the fear of their own unelectability.”

Until Corbyn’s 2015 victory, the left wore only the medals of their defeats. They now enjoy greater power than at any point in Labour’s history. But Corbyn and his allies have been forced to make their own compromises: the 2017 manifesto accepted Nato membership and Trident renewal. Even more notably, Hannah observes, the document made “no mention of socialism”.

Hannah is admirably clear-sighted about the challenges a Corbyn administration would face: “The socialist left will have to break down the traditional institutions of government and power in order to make any headway.” All left-wing governments, it could be said, end in disappointment. Having defied history several times before, Corbyn’s task is to do so again.

A Party with Socialists in It

Simon Hannah

Pluto Press, 288pp, £12.99