David Cameron is set for a second term as prime minister after an extraordinary election night that confounded pundits, pollsters and analysts and led to the resignations of three party leaders.

Cameron said he hoped to form a government in the coming days after his Conservative Party enjoyed what he described as a "very strong night".

election 2015 results
Prime Minister David Cameron arrives at his constituency election count in WitneyPeter Macdiarmid/Getty Images
election 2015 results
Land Party candidate Deek Jackson gives British Prime Minister and Leader of the Conservative Party David Cameron the finger as he is declared the winner of the Witney constituencyGeoff Caddick/AFP
election cameron
Britain's Prime Minister David Cameron stands next to Bobby Smith of the Give Me Back Elmo Party at the counting centre in WitneyToby Melville/Reuters
UK election 2015
Members of the Land Party gesture at the Windrush Leisure Centre in Witney, Prime Minister David Cameron's seatGeoff Caddick/AFP
election 2015 results
An image of Prime Minister David Cameron and the exit poll results are projected on to the side of Broadcasting House, the headquarters of the BBC in LondonEddie Keogh/Reuters
UK election 2015
Prime Minister David Cameron and his wife Samantha Cameron arrive back at 10 Downing StreetRob Stothard/Getty images
UK election 2015
May 8, 2015: Prime Minister David Cameron delivers brief remarks to the news media in front of 10 Downing Street after returning from Buckingham PalaceChip Somodevilla/Getty Images
UK election 2015
Prime Minister David Cameron and his wife Samantha wave as they return to Number 10 Downing Street after meeting with Queen Elizabeth II at Buckingham PalaceStefan Wermuth/Reuters

Ed Miliband, Labour leader, conceded defeat, saying he was "deeply sorry" for a "very disappointing and difficult night".

He later announced his resignation, thanking his supporters "for the selfies... support and the most unlikely cult of the 21st century – Milifandom"

ed miliband
Labour Party leader Ed Miliband pictured after winning his Doncaster constituency, though his party had a bad nightMatthew Lewis/Getty Images
ed miliband
Labour Party leader Ed Miliband arrives at his party's headquarters in LondonPaul Hackett/Reuters
ed miliband
A Labour supporter holds a card for Ed Miliband outside party headquarters in LondonPaul Hackett/Reuters
ed miliband
Ed Miliband arrives to give his resignation speechMatt Cardy/Getty Images
ed miliband
Labour Party leader Ed Miliband gives his resignation speech at a press conference in WestminsterMatt Cardy/Getty Images
ed balls
Labour Party shadow chancellor Ed Balls speaks to other delegates immediately after finding out that a re-count is required for Morley and OutwoodCraig Brough/Reuters
election 2015 results
Labour Party shadow Chancellor Ed Balls concedes defeat to Conservative candidate Andrea Jenkyns in Morley and Outwood, LeedsCraig Brough/Reuters

Nick Clegg stood down as the leader of the Liberal Democrats after the party lost the majority of their seats at the general election, a set of results he described as "crushing and unkind".

Clegg was able to retain his Sheffield Hallam seat after a close fight with Labour's Oliver Coppard. But the former deputy prime minister was compelled to stand down as head of the Liberal Democrats after his party sustained heavy losses throughout the UK.

election 2015 results
Liberal Democrat leader and Deputy Prime Minister Nick Clegg and his wife Miriam Gonzalez Durantez look dejected as they leave his constituency declaration in SheffieldDave Thompson/Getty Images
nick clegg
Liberal Democrat leader Nick Clegg's shadow is seen as he announces his resignation as leader at a news conference in LondonEddie Keogh/Reuters
nick clegg
Former Liberal Democrat leader Paddy Ashdown applauds Nick Clegg, who resigned as leaderEddie Keogh/Reuters

Scottish nationalists rampaged to victory north of the border, virtually wiping Labour off the map.

Labour's UK campaign chief Douglas Alexander lost his Scottish seat to a 20-year-old politics student, the SNP's Mhairi Black, the youngest British member of parliament since the 17th Century.

election 2015 results
Newly elected Scottish National Party (SNP) member of parliament, Mhairi Black greets Labour candidate Douglas Alexander during the declaration of the general election results for the constituency of Paisley and Renfrewshire South. At the age of just 20, Mhairi Black has become Britain's youngest member of parliament since 1667Lesley Martin/AFP
election 2015 results
Leader of the SNP Nicola Sturgeon looks on during the Glasgow declarationsJeff J Mitchell/Getty Images
election 2015 results
SNP supporters celebrate during the Glasgow declarationsJeff J Mitchell/Getty Images
election 2015 results
Alex Salmond, former Scottish National Party leader, waits for results at a counting centre in AberdeenCathal McNaughton/Reuters
election 2015 results
SNP candidate and former First Minister Alex Salmond attends the count at Aberdeen Exhibition and Conference CentreMark Runnacles/Getty Images

London mayor Boris Johnson swept into parliament in the safe Conservative seat of Uxbridge and will have to leave his job as mayor in a year as a result.

Many believe Johnson has his sights on eventually succeeding David Cameron as leader of the party once Cameron serves out what is looking to be his second and final term in office. Johnson has refused to reveal his political ambitions and praised Cameron's work in charge of the party.

"My friends, the people of Britain after a long and exhausting campaign have finally spoken and I don't think we need any fancy constitutional experts to tell us what they were trying to say. I think they have decisively rejected any attempt to take this country back to the 1970s," Johnson said.

boris
Boris Johnson celebrates on stage following his win in the Uxbridge and South Ruislip constituencyMatt Cardy/Getty Images
election 2015 results
Howling Laud Hope, Monster Raving Loony Party candidate for Uxbridge and Ruislip South, milks the applause on stage after votes were countedJustin Tallis/AFP

Nigel Farage lost his battle to win the South Thanet seat after the Conservative candidate for the constituency secured more than 2,000 votes than the Eurosceptic firebrand.

Farage said he would step down as leader of Ukip, but would consider putting his name forward for a future leadership election.

nigel farage funny photos
Al Murray, the Pub Landlord, FUKP parliamentary candidate , reacts as Nigel Farage, leader of Ukip, fails to win Thanet SouthSuzanne Plunkett/Reuters
Nigel Farage Ukip
Ukip leader Nigel Farage reacts as Conservative Party candidate Craig Mackinlay is announced as the winner of the Thanet South constituencyCarl Court/Getty Images
Nigel Farage Ukip
Nigel Farage resigns as leader of the United Kingdom Independence Party after failing to secure a seat in parliament during a news conference in BroadstairsSuzanne Plunkett/Reuters