IN 1944 Friedrich Hayek received a letter from a guest of the Claridge Hotel in Atlantic City, New Jersey. It congratulated the Austrian-born economist on his “grand” book, “The Road to Serfdom”, which argued that economic planning posed an insidious threat to freedom. “Morally and philosophically, I find myself”, the letter said, “in a deeply moved agreement.”

Hayek’s correspondent was John Maynard Keynes, on his way to the Bretton Woods conference in New Hampshire, where he would help plan the post-war economic order. The letter’s warmth will surprise those who know Hayek as the intellectual godfather of free-market Thatcherism and Keynes as the patron saint of a heavily guided capitalism.

But Keynes, unlike many of his followers, was not a man of the left. “The Class war will find me on the side of the educated bourgeoisie,” he said in his 1925 essay, “Am I a Liberal?”. He later described trade unionists as “tyrants, whose selfish and sectional pretensions need to be bravely opposed.” He accused the leaders of Britain’s Labour Party of acting like “sectaries of an outworn creed”, “mumbling moss-grown demi-semi-Fabian Marxism”. And he stated that “there is social and psychological justification for significant inequalities of incomes and wealth” (although not for such large gaps as existed in his day).

Why then did Keynes advocate Keynesianism? The obvious answer is the Great Depression, which reached Britain in the 1930s, shattering many people’s faith in unmanaged capitalism. But several of Keynes’s ideas dated back further.

He belonged to a new breed of liberals who were not in thrall to laissez-faire, the idea that “unfettered private enterprise would promote the greatest good of the whole”. That doctrine, Keynes believed, was never necessarily true in principle and was no longer useful in practice. What the state should leave to individual initiative, and what it should shoulder itself, had to be decided on the merits of each case.

In making those decisions, he and other liberals had to contend with the threats of socialism and nationalism, revolution and reaction. In response to the Labour Party’s growing political clout, a reform-minded Liberal government had introduced compulsory national insurance in 1911, which provided sickness pay, maternity benefits and limited unemployment assistance to the hard-working poor. Liberals of this kind saw unemployed workers as national assets who should not be “pauperised” through no fault of their own.

This cadre of liberals believed in helping those who could not help themselves and accomplishing collectively what could not be achieved individually. Keynes’s thinking belongs within this ambit. He dwelled on entrepreneurs who could not profitably expand operations unless others did the same, and on savers who could not improve their financial standing unless others were willing to borrow. Neither group could succeed through their own efforts alone. And their failure to achieve their purposes hurt everyone else, too.

How so? Economies produce, Keynes said, in response to spending. If spending is weak, production, employment and income will be correspondingly feeble. One vital source of spending is investment: the purchase of new equipment, factories, buildings and the like. But Keynes worried that private entrepreneurs, left to their own devices, would undertake too little spending of this kind. He once argued, provocatively, that America could spend its way to prosperity. Certainly, countries could underspend their way out of it.

Earlier economists were more sanguine. They believed that, if the willingness to invest was weak and the desire to save was strong, the interest rate would fall to bring the two into alignment. Keynes thought the interest rate had another role. Its task was to persuade people to part with money and hold less-liquid assets instead.

Money’s appeal, Keynes understood, was that it allowed people to preserve their purchasing power while deferring any decision about what to do with it. It gave them the freedom not to choose. If people’s demand for this kind of freedom was particularly fierce, they would part with money only if other assets seemed irresistibly cheap by comparison. Unfortunately, asset prices that were so very low would also depress capital spending—resulting in diminished production, employment and earnings. Falling incomes would reduce the community’s ability to save, squeezing it until it matched the nation’s meagre willingness to invest. And there the economy would languish.

The resulting unemployment was not merely unjust, it was also thuddingly inefficient. Labour, Keynes pointed out, does not keep. Although workers themselves do not disappear through disuse, the time they could have spent contributing to the economy is squandered for ever.

Such wastefulness still haunts the world. Since the beginning of 2008, the American workforce has put in 100bn fewer hours than it could have if fully employed, according to the Congressional Budget Office. Keynes was often accused by bean-counting officials of a cavalier disregard for fiscal rectitude. But his penny-foolishness was nothing compared with the extraordinary waste of resources from mass unemployment.

Somewhat pink

The remedy most often associated with Keynes was simple: if private entrepreneurs would not invest heavily enough to maintain high employment, the government should do so instead. He favoured ambitious programmes of public works, including rebuilding South London from County Hall to Greenwich so that it rivalled St James’s. In his letter to Hayek, he admitted that his moral and philosophical agreement with “The Road to Serfdom” did not extend to its economics. Britain almost certainly needed more planning, not less. In the “General Theory” he prescribed “a somewhat comprehensive socialisation of investment”.

His worst critics have seized on the illiberal, even totalitarian, implications of that phrase. It is true that Keynesianism is compatible with authoritarianism, as modern China shows. The interesting question is this: if Keynesianism can work well without liberalism, can liberalism prosper without Keynesianism?

Liberal critics of Keynes make a variety of arguments. Some reject his diagnosis. Recessions, they argue, are not the result of a curable shortfall of spending. They are themselves the painful cure for misdirected spending. Slumps thus pose no conflict between liberty and economic stability. The remedy is not less liberalism but more: a freer labour market that would let wages fall quickly when spending flags; and an end to activist central banks, because artificially low interest rates invite the misdirected investment that ends in a bust.

Others say that the cure is worse than the disease. Recessions are not reason enough to infringe on liberty. This stoicism was implicit in Victorian institutions like the gold standard, free trade and balanced budgets, which tied governments’ hands, for better or worse. But by 1925, society could no longer tolerate such pain, partly because it no longer believed it had to.

A third line of argument mostly accepts Keynes’s diagnosis but quarrels with his most famous prescription: public mobilisation of investment. Later liberals placed more faith in monetary policy. If the interest rate would not naturally reconcile saving and investment at high levels of income and employment, modern central banks could lower it until it did. This alternative sat more comfortably with liberals than Keynesian fiscal activism. Most of them (although not all) accept that the state has a responsibility for a nation’s money. Since the government will need a monetary policy of one kind or another, it might as well choose one that helps the economy realise its full potential. These three arguments have rebuttals. If an economy has spent badly, surely the solution is to redirect expenditures, not to reduce them. If liberal governments do not fight downturns, voters will turn to illiberal governments that do, jeopardising the very freedoms the government’s pious inaction was meant to respect. Last, Keynes himself thought easy money was helpful. He just doubted it was sufficient. However generously supplied, extra liquidity may not revive spending, especially if people do not expect the generosity to persist. Similar doubts about monetary policy have revived since the financial crisis of 2008. The response of central banks to that disaster was less effective than hoped. It was also more meddlesome than purists would like. Central-bank purchases of assets, including some private securities, inevitably favoured some groups over others. They thus compromised the impartiality in economic affairs that befits a strictly liberal state. In severe downturns Keynesian fiscal policy may be more effective than monetary measures. And it need not be as heavy-handed as its critics fear. Even a small and unassuming state must carry out some public investment—in infrastructure, for example. Keynes thought these projects should be timed to offset downturns in private spending, when men and materials would anyway be easier to find.

In promoting investment, he was happy to entertain “all manner of compromises” between public authority and private initiative. The government could, say, underwrite the worst risks of some investments, rather than undertaking them itself.

By the 1920s Britain had progressive taxation and compulsory national insurance, which collected contributions from wage-earners and firms during periods of employment, then shelled out unemployment benefits during spells of joblessness. Although not intended as such, these arrangements served as “automatic stabilisers”, removing purchasing power during booms and restoring it during busts.

This can be taken further. In 1942 Keynes endorsed a proposal to lower national-insurance contributions during bad times and raise them in good. Compared with varying public investment, this approach has advantages: payroll taxes, unlike infrastructure projects, can be adjusted with the stroke of a pen. It also blurs ideological lines. The state is its most Keynesian (judged by stimulus) when it is also at its smallest (measured by its tax take).

Keynesian theory is ultimately agnostic about the size of government. Keynes himself thought that a tax take of 25% of net national income (roughly 23% of GDP) is “about the limit of what is easily borne”. He worried more about the volume of spending than its composition. He was broadly happy to let market forces decide what was purchased, provided enough was. Done right, his policies only distorted spending that would otherwise not have existed at all.

Keynesianism can certainly be carried to excess. If it works too well in reviving spending, it can strain the economy’s resources, yielding chronic inflation (a possibility that also worried Keynes). Planners can miscalculate or overreach. Their power to mobilise resources can invite vociferous lobbying, which can turn militant, requiring a forcible government response. The totalitarian states Keynes worked so hard to defeat showed that the “central mobilisation of resources” and “the regimentation of the individual” could destroy personal liberty, as he himself once noted.

But Keynes felt that the risk in Britain was remote. The planning he proposed was more modest. And some of the people carrying it out were as worried about creeping socialism as anyone. Moderate planning will be safe, Keynes argued in his letter to Hayek, if those implementing it share Hayek’s moral position. The ideal planners are reluctant ones. Keynesianism works best in the hands of Hayekians.