WHEN the British election campaign started, a victory for Theresa May looked a nailed-on certainty. The Conservative lead was as high as 20 percentage points and the party was 1/20 on to claim the most seats. But a poorly run campaign means that the gap has narrowed; the latest from Survation had the Conservatives with just a one-point lead.

The betting markets still assume that the Tories will win, albeit with a majority of 70 or so rather than the 100 plus that was assumed earlier in the campaign. But what if the gambling markets are wrong, as they were about Brexit and Trump? Nate Silver, the American polling guru, argues that British pollsters have made adjustments to their models since the 2015 failures. These adjustments reflect a perceived anti-Tory bias so to assume that the pollsters are still underestimating the Conservative vote may be a mistake. Indeed, in the past, when the Conservatives have been in the lead, polls have overestimated their vote. So he thinks a polling error might be likely in either direction.

That means a Labour government is theoretically possible. There are 650 seats in Parliament—four of whom are from Sinn Fein, who don’t take their seats. Thus 324 seats would be an effective majority. Ten Ulster Unionists could be relied on vote with the Tories. So 314 is the magic number for Theresa May. Anything lower than that (and a model from YouGov puts them on 305) and Mrs May would struggle to rule. The combination of Labour, Liberal Democrats, the Greens and the Scottish nationalists would happily vote her down on any issue of confidence such as a budget. That might lead to another election or a minority Labour government.

How would the markets react to that? Caution is needed. Sterling fell as predicted after the Brexit vote but that boosted the FTSE 100 index because of the effect on overseas earners. Most people thought Donald Trump’s win would hit the American market, but equities rebounded strongly.

If the Parliament is closely hung, leaving a second election likely, the pound will surely take a hit; equities too. Uncertainty would mean that overseas investors would be reluctant to commit cash to Britain. Over time, however, most would assume a softer Brexit if Labour wins, particularly as the party would need support from the pro-European nationalists and Lib Dems. That might be good for sterling (which has tended to fall whenever a hard Brexit looks likely). If, however, Labour was set to push through more of the economic policies favoured by John McDonnell and Jeremy Corbyn (pictured above), such as higher corporate taxes, a financial-transaction tax, nationalisation and taxes on executives, then the markets are likely to take alarm. These are not the kind of policies that will persuade businesses to invest in, or stay in, a country that is leaving the European Union. The better Labour does (that is, the closer it gets to governing on its own), the more likely it is that sterling and equities will take a hit.

As for gilts, the picture is mixed. Government bonds are the asset that gets bought by the risk averse, so they could benefit from a flight out of equities if Labour wins. On the other hand, ten-year gilts are yielding a smidgeon over 1%. That doesn’t offer much of a return for investors who might worry that a Labour government would cause bond issuance to soar; bonds would be needed to fund the infrastructure plan and the nationalisation programme while it seems likely that the money raised by planned tax increases would fail to fully fund Labour’s spending promises.

The shock would surely be great. Within two years, Britain would have lurched from having a market-friendly government that was in the EU to having a left-wing government that was outside it. The odds are still against this happening. But if it does, Britain’s image in the world will have changed completely.