LONDON (AP) — Prime Minister Theresa May stepped down Friday as leader of Britain’s Conservative Party after admitting failure in her attempt to withdraw the country from the European Union. She will remain as a caretaker prime minister for a few weeks while the party picks a successor.

A look at what happens next:

CONSERVATIVE CONTEST

Britain’s next leader will be chosen by the 313 lawmakers and about 160,000 members of the Conservative Party.

Nominations for party leader will close on Monday afternoon. So far, 11 lawmakers have said they will run.

The favorite — at least on betting markets — is Boris Johnson, a former foreign secretary and leader of the 2016 referendum campaign to leave the EU.

His rivals include supporters of “hard Brexit” like Dominic Raab and Ester McVey, who are determined to leave the EU on the scheduled date of Oct. 31, even if it means a rocky no-deal Brexit.

Also in the running are such figures as Jeremy Hunt and Michael Gove, who say they can renegotiate the pullout agreement with the EU to get better terms.

The EU insists it will not reopen the deal.

___

PROCESS OF ELIMINATION

After hearing pitches from all the contenders early next week, Conservative lawmakers will vote by secret ballot on Thursday. Any candidates who don’t get at least 5% have to drop out. Further rounds will be held on June 18, 19 and 20 if needed, with the least popular candidate eliminated each time.

The final two candidates will meet in a runoff that will be decided by mail by the country’s 160,000 Conservative Party members. The winner will be announced the week of July 22.

___

PM PERIL

The winner will become Britain’s prime minister — but it’s unclear for how long.

The opposition Labour Party has said it could call a no-confidence vote in the government immediately, before Parliament breaks up for its summer recess at the end of July.

If the government loses, Britain will be headed for a snap election within weeks.

___

KNOWN UNKNOWNS

Whatever the leadership candidates promise, the future may be beyond their control.

Britain’s Parliament has voted not to let the country leave the EU without a divorce agreement and will do its utmost to prevent a no-deal Brexit.

Raab has suggested he might suspend Parliament if it looked like lawmakers were about to stymie Brexit. He was quickly criticized by other contenders, who said that in Britain’s democracy, Parliament is sovereign and must not be ignored.

Some candidates have said they could seek a short further delay to reach a deal. But any extension to the Oct. 31 deadline must be approved unanimously by the 27 other EU leaders — and the bloc is weary of Britain’s Brexit melodrama. Some in the EU might prefer the pain of a chaotic Brexit over further turmoil.

One path remains open to Britain if it cannot find a way forward — cancel Brexit by revoking Article 50, the mechanism by which countries can leave the EU. The government has ruled it out, and it would infuriate many Britons who voted to leave, but some lawmakers have discussed it as a measure of last resort.