By-elections are the plot twists of British politics. While a surprise win can be entirely fleeting — many of the most celebrated are reversed at the next general election — a shock result can have a disproportionate impact. The stunning Liberal Democrat victory at Chesham and Amersham has just such potential. At the 2019 general election, the Tories held with more than 55 per cent of the vote. On Friday they awoke to find their support had fallen to little more than a third.

This twist, however, was flagged in advance. Both the Conservatives’ win in the northern deindustrialised port town of Hartlepool and their loss in Chesham and Amersham, a commuter-belt seat in the south of England, are signs of a structural shift in British politics. The progressive parties, the Lib Dems and Labour, are gaining ground in the traditional Tory heartlands of the south, while the Conservatives make strides in the north and Midlands.

Nevertheless the circumstances were benign for the Lib Dems, the UK’s largely becalmed centre party. Chesham and Amersham voted to remain in the 2016 EU referendum and the Lib Dems made significant progress there in local elections. The contest, triggered by the death of the long-serving incumbent MP, offered a cost-free protest vote against a government whose majority is secure.

Most important, however, there was something to protest about. The seat is in the frontline of two significant planning issues. The first is the High Speed Two rail project; the second and probably more crucial is the government’s desire to expand housebuilding in the south.

The latter is to be achieved through reform of the planning and centrally directed housebuilding targets for councils. A number of southern conservative MPs, including the former premier Theresa May, are deeply worried about these proposals. There are enough of them to threaten the government’s majority and they have already secured some concessions. A victory for the Liberal Democrats in Chesham and Amersham will give these rebels ammunition.

This concern plays into the deeper fear among southern Tories that the party leadership is simply neglecting these areas, in much the same way Labour took for granted some supporters in the north. As a result, Chesham and Amersham may nudge the Tory leadership into a course correction. Some recognition of the problem would be wise — not least because it is always sensible to pay attention to voters — but an overreaction which saw a substantial retreat from housebuilding would be a mistake.

The UK’s housing shortage is a pressing issue which any government has to address with a serious commitment to building hundreds of thousands of new homes. Neither planning reform nor HS2 should be abandoned. The Conservatives need to think about their long-term interests too: a lack of affordable homes in the south-east, especially in London, is one of the factors driving younger, more left-leaning voters deeper into the suburbs and, most likely, stopping them from becoming more conservative as they age.

Politics nonetheless necessitates that ministers pay heed to the anti-development tendency on their own backbenches. The government may need to be less centralising and give more weight to the added infrastructure — schools, hospitals, transport and so on — demanded by population growth. There are doubtless compromises to the planning reforms which could be offered. Ultimately, however, not all concerns can be alleviated and the government should not cave in. New homes are needed and must be built.