IN THE mythologies of both left and right, the welfare state is a work of socialism. Yet the intellectual tradition it owes most to is liberalism. The architect of its British version, William Beveridge, did not want to use the power of the state for its own sake. The point was to give people the security to pursue the lives they chose. And liberal reformers believed that by insuring people against some risks of creative destruction, welfare states would bolster democratic support for free markets.

In the decades since Beveridge published his seminal report in 1942, welfare states have spread, grown larger, more complex and, often, less popular (see article). This shift has many causes. But one is that welfare states have often diverged from the liberal principles that underpinned them. It is these principles that must be reaffirmed.

As countries become richer they tend to spend higher shares of national income on public services and benefits. Spending on “social protection”, such as pensions, unemployment insurance and assistance for the hard-up, has risen from an average of about 5% of GDP in rich countries in 1960 to 20% today. Include spending on health and education and those shares roughly double. For some, the sheer scale of these welfare states is reason enough for reform.

But what the welfare state does is perhaps more important than its size. It should seek to allow individuals to make their own choices, whether through support for parents to return to work as in Scandinavia, personal budgets for disabled people to select their own provision as in England, or Singapore-style learning accounts so that the jobless can acquire new skills.

Everyone needs enough to live on. Many of those who drop out of the job market, or who work in the gig economy, struggle to get by. And too often, help for the poor comes in ways that are cruel, inefficient, paternalistic or complex. In some rich countries, the unemployed face marginal tax rates of over 80% when they begin a job, because of the loss of benefits.

Any welfare reform entails trade-offs between the cost of a scheme and its effects on poverty and incentives to work. No scheme is perfect. But a good basis is the negative income tax, which subsidises workers below an earnings threshold, while taxing those above it. Negative income tax can be combined with a minimum income for everyone. It is a relatively simple, efficient way of targeting poverty while maintaining incentives to work, so long as the tax rate is not too high.

Reform, however, also requires taking on two challenges that did not cause Beveridge much concern. The first is ageing. The ratio of working-age people to the retired in rich countries is projected to fall from about four to one in 2015 to two to one by 2050. And as countries grey, welfare spending becomes more biased towards the elderly. To mitigate rising intergenerational inequality, it would make sense to cut the cushiest benefits for the elderly and steadily raise retirement ages.

Refusing the wretched

The second challenge is immigration. Across Europe, “welfare chauvinism” is on the rise. This supports a generous welfare state for poorer, native-born people—but not immigrants. Populists argue that, if migrants from poor countries immigrate freely to rich ones, they will bankrupt the welfare state. Others argue that liberal migration policies depend on curbing access to it: build a wall around the welfare state, not the country. Polls suggest that few native-born Europeans want to deprive new arrivals of instant access to health care and schools for their children. But some restrictions on cash benefits, like those already in place in America and Denmark, may be necessary.

As liberals such as Beveridge realised, the best way to secure support for free markets is to give more people a stake in them. The welfare state must be seen as more than providing shoes and soup for the poor, and security in old age. In a democratic society it is also crucial to the case for capitalism.