Prime Minister David Cameron's decision to resign after he lost the campaign to keep Britain in the EU triggered a leadership contest in his Conservative party, the winner of which will replace him in Downing Street.

He had already said that he would step down before the next election in 2020, and a number of Conservative lawmakers have positioned themselves as potential successors. Britain's next prime minister will have the task of negotiating the country's exit from the European Union.

Here are the key steps following his resignation:

Cameron out

Cameron had called the referendum and campaigned hard for a "Remain" vote in Thursday's vote, so his departure was inevitable, but is a humiliating end to his career.

The 49-year-old became Britain's youngest prime minister in nearly 200 years in 2010, and last year was re-elected with a Conservative majority.

Cameron will hand over the leadership and the keys to Downing Street by the latest at the Tory party conference in October. He leaves behind a party that is deeply divided, with six of his ministers and 128 of 330 Conservative lawmakers having backed a Brexit.

Who can succeed Cameron?

A committee of senior Conservative lawmakers will meet on Monday to formally start the leadership process.

Here are some potential candidates:

Boris Johnson: Instantly recognisable with his mop of golden hair, Brexit figurehead Boris Johnson can claim much of the credit for propelling the "Leave" side to victory.

The 52-year-old former London mayor has the popular touch, and his relentless campaigning for a Brexit has endeared him to many eurosceptic Conservative voters.

It has also boosted his national profile, although he has critics among Conservative MPs and some accuse him of only backing the "Leave" camp out of political self-interest.

Michael Gove: The justice minister was a close friend of Cameron's and his decision to defy him and campaign for a Brexit was a blow to the prime minister. The 48-year-old former journalist presented the more sober, cerebral face of the "Leave" campaign.

His low point was comparing economic experts warning about the effects of a Brexit to the Nazis who smeared Albert Einstein in the 1930s. He later apologised.

Theresa May: Interior minister Theresa May avoided the in-fighting that has dominated the campaign, giving her a unique position among those likely to want to succeed Cameron.

May declared herself officially in favour of Britain staying in the EU, despite being a long-standing eurosceptic and hardliner on immigration.

But the 59-year-old kept a low profile, treading a fine line between remaining loyal to Cameron and appeasing Tory core supporters with a call for reform to the rules that allow any EU citizens to move to Britain.

George Osborne: Finance minister George Osborne, Cameron's close ally, has long been mentioned as a possible successor but his strong support for a "Remain" vote angered many Tory members.

He fronted a raft of official warnings over the economic risks of a Brexit that rivals dubbed "Project Fear", and accused his rivals of being "economically illiterate". His final warning that he may have to raise taxes and slash spending on schools and hospitals if Britain voted to leave saw him dubbed the "kamikaze chancellor".

Most commentators agree that his leadership ambitions are now all but dead. - Other possibilities include two pro-European cabinet ministers: Nicky Morgan, the education secretary, and Stephen Crabb, the work and pensions secretary.

Naming a new prime minister

In Britain voters elect parties and not prime ministers, so a change of the leadership at the top of the governing party does not require a new election to be called.

Those hoping to succeed Cameron must first submit to a vote by Conservative MPs. The two most popular candidates will then be put to a vote by the party's 150,000 members.

Mission: Leaving the EU

Cameron said the new prime minister will have to launch a procedure to leave the EU by invoking Article 50 of the Lisbon Treaty, which defines the conditions for a voluntary and unilateral exit.

There would then be a period of negotiation leading up the exit, since Britain and the EU need to define their new bilateral relations. The premier will also have the task of uniting a country profoundly divided by the EU vote, and dealing with the potential secession of Scotland.–AFP