Out of 650 seats, Conservatives secured 318 and Labour 261. 326 seats needed for overall majority.

The rollercoaster ride that has been British politics over the past year continued unabated on Friday as British Prime Minister Theresa May prepared to head to Buckingham Palace to attempt to form a new government, with the support of the Democratic Unionist Party of Northern Ireland. Mrs. May’s own leadership is on the line, as the snap election resulted in a hung Parliament, as the Conservatives lost at least 12 seats, while the Labour party gained at least 29, leaving the Conservatives’ hope of gaining validation of their Brexit strategy at the ballot box in tatters.

By late morning all but 1 of the 650 seats had been declared, with the Conservatives on 318 — well short of the 326 they needed to have an overall majority — and the Labour Party on 261.

"Politics has changed and politics isn’t going back into the box it was in before. They’ve said they’ve had enough of austerity politics and not giving young people the chance they deserve in our society,” said Mr. Corbyn as he secured a greater majority in his seat of Islington North.

An emotional Theresa May, speaking as she secured a comfortable victory in her seat of Maidenhead, said the country needed stability, and that if the Conservatives had won the most seats as the exit poll had predicted, it would be incumbent on them to have that stability. “That is what we will do.”

While the Conservatives gained seats in Scotland, they failed to make gains in Labour heartlands such as Wrexham, where Mrs. May had campaigned personally, while the party suffered shock defeats such as in the south east city of Canterbury, which had been a safe Conservative seat since 1918. In others the party saw its share of the vote slide, such as in the London constituency of Putney, where it hung on by a majority of just over 1,500 seats. The last constituency yet to declare Kensington is thought to be on a knife-edge, after a third count was ordered.

Even beyond the Conservatives, the polls delivered a number of shocks — with two senior SNP figures Angus Robertson and Alex Salmond losing their seats, as the party came under pressure from a resurgence in support for both the Conservatives and the Labour Party. The Liberal Democrats also appeared to be having muted success at efforts to revitalise the party’s support base through its pledge to hold a referendum on the terms of the Brexit deal. Nick Clegg, the party’s former leader who was deputy Prime Minister under the 2010 coalition with the Conservatives, lost his seat, while the party’s leader Tim Farron held on with a narrow majority. Conservative Home Secretary Amber Rudd won her seat but by a narrow margin of 346 votes.

The exit poll, for the BBC, released at 10 p.m. local time, put the Conservatives on 314 seats, a drop of 17 seats, and Labour on 266, a gain of 34.

The close result is a sharp reversal of the comfortable lead that the Conservatives had in April, when Mrs. May called the general election. Commentators had suggested that turnout, particularly among young people, would be key to the result, with Labour benefiting from a high turnout particularly among young people who had been inspired by Labour Leader Jeremy Corbyn’s campaign, centred around the idea of “For the Many Not the Few,” against the Conservatives’ “strong and stable” emphasis.

The results would be a personal disaster for Mrs. May, around whom the entire Conservative campaign was pegged, but whose personal ratings have fallen sharply over the course of the campaign. This was the result of a combination of policy blunders, including on social care for the elderly, and the perception that Mrs. May was failing to engage with the electorate directly — for example, failing to participate in a televised debate with other leaders.

“When we didn’t know her she appeared a rather magnificent and dignified figure…the more they have seen of her the less they seem to trust her,” Matthew Paris, a political commentator, and former Conservative MP told ITV News on Thursday night.

“This election is a rejection of May and hard Brexit. A vote for one to go and the other to be revisited,” tweeted Alastair Campbell, former campaign director to Tony Blair.

The result would be a validation of the approach of Mr. Corbyn, under whose leadership there has been a groundswell of support for Labour, against the belief of many in his party, including within Parliament, where he faced a vote of no confidence in 2016.

When calling the general election, the Conservatives had counted on capitalising on a collapse in public support for UKIP, as the Conservatives became the party of Brexit, as well as the perceived lack of public support for the Labour party, but that assessment began to run into trouble in May when the parties released their manifestos, with the Labour party’s being praised for reflecting both some of Mr. Corbyn’s more radical policies as well as those of the wider party. The Labour party also attempted to allay concerns that its ambitions were not fiscally viable by fully costing its proposals. While in the early days the Conservative campaign attempted to pitch itself around Mrs. May and "her team" as the polls narrowed, its campaign grew more negative, focussing instead on attacking the “coalition of chaos” that could result from a Labour victory.