Media playback is unsupported on your device Media caption David Cameron: ''Together we can make Great Britain greater still"

David Cameron has promised to lead a government for "one nation" and make "Great Britain greater" as he returned to Downing Street as prime minister.

Speaking outside No 10 after visiting Buckingham Palace, he said the UK was "on the brink of something special".

The Conservatives have 331 seats - five more than needed for a Commons majority - their first such victory since 1992.

Mr Cameron's rivals Ed Miliband, Nick Clegg and Nigel Farage have all resigned after election disappointment.

The Conservative leader is now beginning the process of putting together the new government. George Osborne has been reappointed as chancellor, Theresa May as home secretary, Philip Hammond as foreign secretary and Michael Fallon as defence secretary.

Image caption The three party leaders appeared together for the last time at the VE Day commemorations

Mr Cameron said he would reach out to all parts of the UK and strive to "bring the country together" in the wake of the SNP's election landslide in Scotland - where it won 56 of the 59 seats.

In other election developments:

The Conservatives' victory means they will be able to govern without the need for a coalition or a formal agreement with other parties.

Mr Cameron said he had spoken to both Mr Miliband and Mr Clegg, paying tribute to the latter's contribution to the coalition government over the past five years.

Media playback is unsupported on your device Media caption Ed Miliband: ''It is time for someone else to take forward the leadership of this party''

Media playback is unsupported on your device Media caption Nick Clegg: "I must take responsibility and therefore I announce that I will be resigning as leader of the Liberal Democrats''

Media playback is unsupported on your device Media caption Nigel Farage: "Part of me is happier than I have felt for many, many years"

Speaking in Downing Street, he said: "We will govern as a party of one nation, one United Kingdom.

"That means ensuring this recovery reaches all parts of our country, from north to south, to east to west."

He said he would press ahead with devolution of powers to all nations as well as referendum on the UK's EU membership.

"I have always believed in governing with respect," he said "That's why in the last parliament we devolved power to Scotland and Wales, and gave the people of Scotland a referendum on whether to stay inside the United Kingdom.

Analysis by BBC experts

Norman Smith on David Cameron's colossal achievement

Nick Robinson on the result no-one saw coming

Mark Easton on a nation divided

Jonny Dymond on how the Conservatives won their historic victory

Jonny Dymond on where next for Labour

Brian Taylor on what next for Scotland

Robert Peston on market reaction to the result

James Cook on the implications for the United Kingdom

Katya Adler on the reaction from Europe

David Cowling on how the pollsters got it so wrong

Newsnight reporters and producers' rolling election analysis

"In this parliament I will stay true to my word and implement as fast as I can the devolution that all parties agreed for Wales, Scotland and Northern Ireland."

George Osborne has also been given the title first secretary of state, giving him seniority over other cabinet ministers.

He said the Conservatives had been "given a mandate to get on with the work we started five years ago" and would follow the "clear instructions" of the British public.

'Dark hour'

Speaking at Labour's London headquarters, Mr Miliband said he had phoned David Cameron to congratulate him on his victory.

He said he would step down as leader with immediate effect after Labour won 26 fewer seats than in 2010, adding that deputy leader Harriet Harman would succeed him pending a leadership contest.

Image copyright Reuters Image caption Ed Balls was one of the night's highest-profile casualties

Image copyright Getty Images Image caption Four ministers have been reappointed to the senior offices of state

Image copyright Getty Images Image caption But Boris Johnson is backed in Parliament and tipped for a ministerial role

Labour, he said, needed an "open and honest debate about the way forward without constraints".

"I am truly sorry that I did not succeed," he told party supporters. "I have done my best for nearly five years."

He added: "Britain needs a strong Labour Party. Britain needs a Labour Party that can rebuild after this defeat. We have come back before and we will come back again."

Announcing his own exit as leader after more than seven years, Mr Clegg said the results - which saw his party reduced from 57 to eight seats - were the most "crushing blow" to the Liberal Democrats since they were formed in the late 1980s.

"This is a very dark hour for our party," he told party supporters in London. "But we cannot and we will not allow the values of liberalism to be extinguished overnight. Our party will come back. Our party will win again."

David Cameron has been congratulated on his victory by a number of foreign leaders.

Jean-Claude Juncker, president of the European Commission, said he would work constructively with the new UK government and would consider "proposals, ideas or requests" about the UK's membership "in a very polite, friendly and objective way".

An independent inquiry is to look at the accuracy of UK election polls, after they failed to predict the Conservatives' lead over Labour.

2015 election results map

Image caption Conservatives won 331 seats and Labour 232 - followed by the SNP with 56 seats out of 59 in Scotland

Full results service