The resignation of British Prime Minister Theresa May might be seen as the key that unlocks the country from the debilitating debate over leaving the European Union. More likely is that her departure sets off a period that will bring even greater challenges and potentially more chaos to a weakened political system.

May tried for nearly three years to implement the Brexit referendum of June 2016 that, by a narrow margin, called for the country to sever ties with the E.U. Her mistakes were many, her political skills limited, her opponents implacable. Finally the members of her party, their patience run out, forced her to step aside. Her resignation resolves little, however, other than to make others try to do what she could not.

What comes next? Oh, nothing much, other than a fractious fight to pick a new Conservative Party leader and prime minister, the Oct. 31 deadline for leaving the E.U. on terms still not known, and potentially a general election at some point that will test the coalitions of the Tories and the Labour Party.

It was perhaps fitting that May announced her resignation just as the elections for the European Parliament were taking place. The elections could bring significant setbacks to the major parties, but especially the Conservatives, due to the return of Nigel Farage under the banner of his new Brexit party. Those results Sunday could be an indicator of what lies ahead.

The existence of a rising pro-Brexit, anti-Europe party threatens to splinter the Conservatives even more than they have been. Whatever strength Farage’s party shows in the European elections will be the first volley in the battle over the future direction of the Conservative Party at home. The coming leadership contest will be the first indicator of the party’s future makeup and ideological balance.

At the starting gate, the betting favorite is Boris Johnson, the former mayor of London who served for a time as foreign secretary in May’s government. He is a charismatic but volatile politician who leaped aboard the Brexit express and became one of its most prominent faces during the referendum campaign in 2016.

Johnson is as controversial as he is colorful. At an earlier point when May’s future looked dim, he seemed like a long shot to compete for the leadership of the party. Today, he is seen as, perhaps, the person best positioned to protect the Tories from a significant erosion in support from the most ardent pro-Brexit voters.

May will step down as of June 7, but she will remain in place until her successor is selected. Johnson must run through the hurdles of the leadership contest, and he will have any number of rivals. Members of the Conservative Party must weigh the potential costs to its coalition of picking someone other than Johnson against the costs of putting their futures in the hands of someone so many of them do not fundamentally trust.

Johnson is also fully capable of making a hash of his leadership bid. Rule nothing out when it comes to him.

Johnson enjoys the apparent goodwill of President Trump. The president roiled British politics when he visited there last summer by saying in an interview with a British newspaper that he thought Johnson would make a fine prime minister. The interview landed just as May was hosting Trump at an elaborate ceremony and dinner and caused an uproar until the president lavished praise on his host the next day.

But the president, who embraced the Brexit vote when it happened, has also been friendly with Farage. He will be in Britain for a state visit just before May steps down and will be watched closely for any signs of partiality in the Tory leadership fight.

However the leadership contest turns out, the next prime minister will be responsible for managing the country’s exit from the E.U. May tried three times to get Parliament to support her plan, only to be defeated, in one case by the largest margin in the country’s history.

She tried to work within her party — stubbornly, in the estimation of her critics — and when she hit the wall, she sought cross-party talks with Labour and its leader, Jeremy Corbyn. Those talks predictably went nowhere, which is where things now stand.

European leaders have set Oct. 31 as a hard deadline — no more extensions, they have said. That could mean a “hard Brexit,” a departure without any real plan. The hard-liners in the Conservative Party have favored that course on the theory that Britain can and should write its own destiny. Others worry for good reason about the collateral damage to the nation’s economy and the standing in the world of such a step.

Can a new prime minister do better? A new pro-Brexit leader will be confronted by the same divisions that scuttled May’s efforts. A pro-Brexit leader who goes soft in the hope of finding support across the party divisions risks a revolt and a party fracture. Britain could soon find that it was more than May’s failures that brought her down. The political system as a whole has failed.

May succeeded David Cameron as prime minister when Cameron stepped down the day after losing the Brexit vote. He gambled and failed. May later gambled and failed by calling a snap election in 2017. She hoped the election would expand her parliamentary majority and strengthen her hand in the Brexit deliberations. Those elections resulted in a hung Parliament, eroding her power and ultimately sealing her fate, though it has taken nearly two years for that resolution to come about.

The selection of her successor could lead to another general election. Given the turmoil in the Conservative Party, a new election could be the vehicle for Labour to return to power for the first time in nearly a decade. But Labour, too, has its internal problems — and a leader in Corbyn who brings his own vulnerabilities.

British politics is split at least four ways right now. There is the traditional competition between the two major parties, Conservative vs. Labour, although at this moment both are losing favor. Then there is also the fundamental, binary division in the country over Brexit — Leavers vs. Remainers. That has scrambled the coalitions of both parties and made leadership all the more difficult.

Corbyn has tried to walk a tightrope. Widely seen as nominally pro-Brexit, or at least anti-E.U., personally, he has refused to declare a strong position on the biggest issue in British politics. He dances away from every effort by reporters to pin him down. In the European elections, he has done the same, claiming he wants his party to be a tent big enough to accommodate voters on both sides of the Brexit debate who otherwise side with Labour’s politics and policies.

If the Conservatives remain as divided as they are now and if there is a pro-Brexit vehicle for voters to embrace, Labour would be in position to regain power, save for the fact that many voters probably would pause before putting the country in Corbyn’s hands.

British politics has been frozen for more than two years, to the dismay and disgust of British voters. May has been the focal point of much of this anger. The next months will tell whether the country is suffering from a more systemic breakdown or whether changes in leadership can restore trust and confidence that has taken a battering.