British Prime Minister David Cameron has announced he is resigning after the referendum result to leave the European Union.

Key points: Mr Cameron was one of the leaders of the Remain campaign

Mr Cameron was one of the leaders of the Remain campaign Now Mr Cameron says Britain deserves a change in leadership

Now Mr Cameron says Britain deserves a change in leadership Says UK should aim to have new PM in October

The final result showed 17.4 million people voted Leave and 16.1 million people voted Remain.

In his official statement outside 10 Downing Street, Mr Cameron, who was one of the leaders of the Remain campaign, said the decision warranted a change in leadership.

"I will do everything I can as Prime Minister to steady the ship over the coming weeks and months, but I do not think it would be right for me to try to be the captain that steers our country to its next destination," he said.

"This is not a decision I've taken lightly. But I do believe it's in the national interest to have a period of stability, and then the new leadership required."

Mr Cameron said he would continue on as Prime Minister with his Cabinet for the next three months, but that he would aim to step down in October.

"In my view we should aim to have a new prime minister in place by the start of the Conservative Party conference in October," he said.

"A negotiation with the European Union will need to begin under a new prime minister, and I think it's right that this new prime minister takes the decision about when to trigger Article 50 and start the formal and legal process of leaving the EU."

Mr Cameron said he had spoken to the Queen and informed her of his decision, before concluding with an optimistic message for the UK — which he has led since 2010.

"Although leaving Europe was not the path I recommended, I am the first to praise our incredible strengths. I've said before that Britain can survive outside the European Union, and indeed that we could find a way," he said.

"I love this country, and I feel honoured to have served it, and I will do everything I can in future to help this great country succeed."

Earlier, UK Independence Party leader Nigel Farage had called for Mr Cameron to resign, saying he now dreamed about an independent Britain and an end to the EU.

"The EU is dying. I hope this is the first step towards a Europe of sovereign nation states trading together, neighbours together, friends together but without flags, or useless old unelected presidents," he said.

The decision to leave the EU has spread alarm through markets, with the British pound at its lowest level since 1985.

Former London mayor Boris Johnson is expected to take pole position in the race to Number 10.

He paid tribute to Mr Cameron and reflected upon his "extraordinary" political career in a speech following the announcement.

"How sad I am that he has decided to step down, but obviously I respect that decision," he said.

"I believe he's been one of the most extraordinary politicians of our age."

Labour submit motion of no confidence

Meanwhile, two members of Britain's Labour Party have submitted a motion of no confidence in their leader, Jeremy Corbyn.

Sorry, this video has expired UKIP Leader Nigel Farage says result is a 'victory for ordinary, decent people'

The motion, submitted by MP Margaret Hodge and backed by colleague Ann Coffey, calls for a debate on Mr Corbyn's leadership among the party's parliamentary representatives when it next meets on Monday.

If supported at a later secret ballot, it could then trigger a leadership contest.

Several Labour members have criticised Mr Corbyn, who was elected leader last year on a wave of enthusiasm for his left-leaning agenda, for failing to persuade voters in his party's heartlands in northern England and elsewhere to vote to remain.

"In a leader you need somebody who can communicate a message and inspire confidence in that message, and I think he failed on both counts during the referendum campaign, and therefore I don't think he should be leader of the party," Ms Coffey told the Reuters news agency.