In the last two decades of the 19th century, a new word began to appear in the writings of biologists and zoologists across Europe, inspired by the work of Charles Darwin. “Degeneration” referred to a subset of the evolutionary story by which a species or subspecies began to lose ground in the evolutionary game. In his 1880 work Degeneration: A Chapter in Darwinism, the zoologist E Ray Lankester described the phenomenon as “a loss of organisation making the descendant far simpler or lower in structure than its ancestor”.

For social scientists and political commentators, the implications for societies and nations of such findings were arresting. In Britain, discussions about degeneration quickly became entangled with fears of national decline. The world’s greatest empire was losing ground in the race with its rivals but was also suffering the effects of chronic complaints in its collective health: the consequence of more than a century of explosive industrialisation and chaotic urbanisation. In 1888, the Lancet, the foremost journal of British medicine, announced that degeneration was “undoubtedly at work among town-bred populations”, due to “unwholesome occupations, improper [diet] and juvenile vice”. While the process could be reversible, it was no longer possible “to ignore the existence of widespread evils and serious dangers to the public health”.

The story of the British state’s approach to poverty and welfare is not one of simple progress towards more benevolence and enlightened policy, but it does have some crowning glories. The watershed moment remains the publication in 1942 of William Beveridge’s white paper Social Insurance and Allied Services, which declared war on the five “giant evils”: “want, disease, ignorance, squalor and idleness”. Surprisingly for a government publication, it sold half a million copies, and abbreviated versions were dropped behind enemy lines as a declaration of intent – a domestic version of the Atlantic Charter – indicating the type of nation that Britain aspired to be at the end of the war.

From 1945 to 1951, Beveridge’s proposals became the basis of the legislation by which the Attlee government created a welfare system designed to be the envy of the civilised world, with citizens guaranteed a safety net from “the cradle to the grave”. The most totemic achievement was the creation of the National Health Service in 1948. Yet this was just one pillar of a comprehensive and universal system of insurance, health care, welfare and family allowances to be granted to all citizens, regardless of their means.

For many in the Attlee government, including the prime minister, more significance was attached to the National Insurance Act of 1946, which finally abolished the hated means test associated with past legislation. In the speech in which he announced its provisions before the House of Commons, the prime minister paid tribute to all of the pioneers of the cause of social justice – Keir Hardie, Will Crooks, David Lloyd George, Sidney and Beatrice Webb and Beveridge – but also the many Conservatives who had taken on the challenge of poverty in eras past.

The title of Chris Renwick’s excellent book is taken from Beveridge’s spirited war cry – that it was the duty of the state to ensure “bread for all, before cake for some”. His intention is not to deny the heroism of these welfare pioneers but to place these achievements in a wider context, taking into account contemporaneous developments in political economy, science and sociology. With a combination of scholarship and panache, he traces the origins of sustained thinking about the state’s role in the alleviation of poverty back to the creation of the royal commission on the Poor Laws in 1832.

From the outset, rather than simple charity or concern for the plight of the poor, a desire to eradicate inefficiency, waste and disease made the issue of welfare always inseparable from broader concerns about the “condition of England” or the “state of the nation”. As such, state provision for the poor was “not simply a moral enterprise” but also about refitting and restructuring Britain’s social and political system for the challenges of the modern world.

The early political economists agreed that some relief was a necessary safety valve in the prevention of revolution and disorder; they saw the connection between bread prices, population levels and bouts of political instability. Yet the harshness of the 19th-century welfare regime – with the workhouse and its distinction between the “deserving” and “undeserving poor” – mainly reflected the prevailing economic orthodoxies of the era.

As that system began to unravel in the last quarter of the century, it was under the force of new ideas from evolutionary biology and sociology. These fed into growing anxieties about the health of the body politic and “national efficiency”.

If the fate of nations depended on the “survival of the fittest”, Britain was not faring well. The Second Boer War, from 1899 to 1902, was a turning point in terms of placing the issue at the top of political priorities. Such was the condition of the poor that Britain was simply not fit enough to fight. In Manchester, according to a study by the industrialist and liberal imperialist Arnold White, 11,000 volunteers offered themselves for war service – most of them desperate for any employment – but 8,000 of them were deemed to be “physically unfit to carry a rifle”, or spend long enough on their feet to drill. Of the 3,000 who were accepted, less than half “attained the moderate standard of muscular power and chest measurement” required by the military authorities.

The political response began in earnest with the formation of the Committee on Physical Deterioration in 1903. As Renwick shows, the government avoided the term “degeneration”, but many of the most influential proponents of welfare reform, such as Francis Galton, were also enthusiastic eugenicists – advocates of better breeding and birth control.

The “New Liberal” reforms of the Edwardian era – embodied in the provision of school meals, the 1911 National Insurance Act, the Old-Age Pensions Act and the “People’s Budget” of 1909-10 – took ideas from science, but they also represented an evolutionary leap in the understanding of citizenship and the role of the state (through tools such as graduated income tax and greater levies on “unearned” wealth) in securing the health of the populace as a whole.

By taking the long view on these developments, Renwick makes the case that the creation of the welfare state after 1945 was the “culmination of an intergenerational project”. His book is mainly about the changing trends of opinion within the nation’s intellectual elites, from across the political spectrum.

In the words of the sociologist TH Marshall, the welfare state had “mixed parentage”. In keeping with this, Renwick suggests that Conservative thinking and legislation on welfare in the interwar era were more advanced than many give the party credit for. Ultimately, however, he concludes that the building of the New Jerusalem “owes most to liberalism”, or centre-left progressivism, which was “woven into the welfare state’s identity”.

In substance, this is hard to dispute. The Attlee government drew not only on the work of previous generations but also on that of the wartime coalition of which Attlee was a part. It relied heavily, too, on ideas from liberals such as William Beveridge, who articulated the principle of universality to skewer the hated means test, and John Maynard Keynes, who crucially made full employment the bedrock of a new economic system.

When considered in its entirety, however, the changes ushered in by the postwar government far outstripped those of any of its predecessors. What it achieved was nothing short of a new social contract and a redefinition of the raison d’être of the state. Beveridge was under no illusions: it represented a “revolution”.

As Attlee later reflected, no longer was the struggle about “getting for the underprivileged some crumbs from the rich man’s table”. It was about “providing for all the things which all should enjoy in a modern community”.

Bread for All: The Origins of the Welfare State

Chris Renwick

Allen Lane, 336pp, £20

John Bew is a professor of history and foreign policy at King’s College London and the author of “Citizen Clem: A Biography of Attlee” (Riverrun)