In the wake of a result that once again made a mockery of the polls, British government is now in a state of chaos a little over a week from the start of Brexit negotiations. A second election in a matter of months is possible. One within the next 18 months is almost inevitable.

Prior to the election most indicators pointed in the direction of a Tory landslide. On every measure that usually dictates voting behaviour – leadership, economic competence and security – the Conservatives were way ahead of a hopelessly divided Labour party.

To have converted a 25-point polling lead into losing your majority in the space of six weeks is a remarkable feat. Many within the Conservative party believe the campaign exposed deep flaws in the Prime Minister, who proved to be a surprisingly nervous and uninspiring campaigner, and in the relationships between her leadership team and the rest of the party. The result of this was a disastrous manifesto which alienated many of their core (older) voters.

However, the election result cannot simply be explained by Tory failure. The dramatic increase in Labour’s support is a key story of the night. That must be attributed in part to the energetic and disruptive campaign led by Jeremy Corbyn. His performance both during the campaign and at the polls defied most expectations. His position as Labour leader is cemented although his party remains divided. But it also reflects an electorate tired of austerity faced with a Conservative party who ignored entirely economic policy during the campaign. This allowed Labour’s dramatic public spending increases to remain unchallenged and largely unanalysed.

Overall the election has seen the return of two-party politics, with both the main parties increasing their vote share at the expense of minor parties. In Scotland, the SNP remains the largest party but the loss of 19 seats to Labour, the Tories and Lib Dems is significant blow. The cause of independence has been set back by these results. But the bigger question is what this election means for Brexit and the future of British politics.

Will May survive?

Possibly in the short term. The mechanics of having a leadership election now are very difficult. Someone has to receive the Queen’s commission to form a government. Potential leadership contenders are also very nervous about the prospect of another election whilst Labour has the momentum.  Some Conservatives are talking of May remaining for a few months to steady the party but her authority is irreparably damaged. Even if she carries on temporarily, her No10 operation will be diminished and senior members of the Cabinet will be positioning themselves for the Leadership contest to come.

Who will form a government?

The Conservatives are easily the largest party and just short of having a de facto majority. Even with the DUP the numbers are horrendously tight and Theresa May will be at the mercy of a handful of Tory backbenchers. She could probably win a vote on a Queen’s Speech but would need at the very minimum an understanding with a minor party, almost certainly with Northern Ireland’s Democratic Unionists who are salivating at the prospect of power. They supported Brexit in the referendum and would probably sign up to the current Tory approach but they would demand a high price for support. Such an arrangement is unlikely to be a stable relationship and could even further complicate Brexit negotiations because of the extremely sensitive issue of the Northern Ireland border. Their support under almost any scenario is essential for stable government but it is unlikely to be a happy relationship.

What does this mean for Brexit?

The Brexit negotiations are now in crisis. The Article 50 process has been triggered and the two-year clock is ticking down. But the negotiations that were due to commence on 19 June may now have to be postponed. May’s vision of Brexit has been rejected by voters and parliament is now more evenly balanced between hard and soft Brexiteers. That opens the door to a different and potentially softer approach. Some may even see an opportunity to revisit the whole question, especially with a further election likely to be necessary. Certainly the soft-Brexiters have been strengthened by last night’s results and cross-party alliances are likely to try to soften the government’s stance.

Tory divisions likely to reappear

The Brexit referendum result and the arrival of Theresa May in place of David Cameron seemed set to draw a line under historic Tory divisions on the question of Europe. Had she won a massive majority at this election she would have been in a position to finally settle the issue. Instead the outcome has created new uncertainty. Tory Remainers will be emboldened. Old divisions are likely to resurface as pro-Europeans across parliament will demand more say in the UK negotiating position including freedom of movement and the relationship with the single market and customs union.

Labour is galvanised – for now

In an amazing turnaround Labour has emerged from the election more galvanised than it went into the contest. Corbyn’s position is solidified and even his harshest critics have had to acknowledge his success in tapping into a strong seam of popular anti-establishment sentiment. The prospect of a Labour victory in a second election cannot be ruled out.

However Labour remains a deeply divided party. Most of Jeremy Corbyn’s leading critics have been re-elected and the Corbynites failed to secure seats for their supporters. Also Brexit divides Labour as deeply as it does the Conservatives but in different ways. The Corbynite leadership are broadly pro-freedom of movement while sceptical of the single market. MPs representing northern seats tend to take the opposite view.

What happens now?

The PM will make a statement this morning following discussions with her Cabinet and party colleagues. It is possible that Cabinet ministers will prevail upon her to stay in the national and party interest. The price she would pay however would be a more consensual style of government with less power for her joint chiefs of staff, Nick Timothy and Fiona Hill.

The Queen’s Speech will have to be radically redrafted to reflect the failure to secure a mandate for the manifesto. Controversial proposals such as grammar schools will be ditched and there will need to be a very minimalist approach. It is possible that, to continue without a second election, senior civil servants may urge the Prime Minister to establish formal mechanisms for consulting parliament, and de facto the Opposition, on Brexit.

Last night’s result is the third surprise voters have inflicted on the political system. As a result, we are in for a period of profound instability and uncertainty.