I N THE END the crunch became an anti-climax. Days before this week’s EU summit, hopes for a Brexit deal were high. But on October 14th Theresa May sent her Brexit secretary to Brussels to block a “backstop” solution guaranteeing that there would be no hard border in Ireland. When EU leaders met before dinner on October 17th to ask her for fresh proposals, Mrs May could promise only that progress was being made towards reaching a deal in the next few weeks. Plans for a November summit were put on hold, so an agreement may have to wait until December.

What went wrong? Many focus on the Northern Irish Democratic Unionist Party ( DUP ), which props up Mrs May’s government. It is against any backstop implying regulatory controls between the province and the mainland (which the EU sees as preferable to controls on the land border with Ireland). Attacks on Mrs May’s deal by hardline Tory MP s have also grown, including on the idea of extending the planned transition period.

Two new interventions tipped the balance. One was a call on the cabinet from David Davis, who quit as Brexit secretary in July over Mrs May’s Chequers compromise, to rebel against her. The second was a revolt by Ruth Davidson, the Scottish Tories’ leader, and David Mundell, the Scottish secretary. They said special treatment for Northern Ireland, which under Mrs May’s plan would stay aligned with the EU ’s single market as well as in a customs union, would be seized on by nationalists wanting the same for Scotland. The United Kingdom would be threatened on two fronts.

The Brexit negotiations have been educational for both sides. Mrs May has learnt that laying down red lines is unwise and that her negotiating position is weak. She has become expert on such arcana as the customs union and the Irish border. She has realised that Brexit is a process that could take years, not a single event next March. And she has accepted that leaving with no deal would be a terrible outcome.

But EU leaders have learnt things, too. Their initial hopes that Brexit would simply not happen have been dashed. And like Mrs May, EU leaders want a deal: no deal would be bad for the continent as well. Above all, they have been educated in British politics, discovering the DUP ’s existence and understanding the pressure on Mrs May from the press and her own party.

For although the week’s drama played mainly in Brussels, the real action now is in London. A deal on a Brexit withdrawal agreement, including an Irish backstop, and a political declaration about future relations is within reach. The obstacle is not the stubbornness of Mrs May, the intransigence of the EU or the obstreperousness of the French. It is doubts about whether Parliament will endorse the deal in the “meaningful vote” it has been promised.

The doubts start with the DUP . Arlene Foster, the party leader, insists she would rather bring down Mrs May’s government than accept controls in the Irish Sea. Mrs Foster is seen in Belfast as a poor negotiator, unable to restore the province’s power-sharing executive with Sinn Fein that fell apart two years ago amid a spending scandal over a heating subsidy. In reality the DUP wants neither a no-deal Brexit nor an election that could lead to a Labour government led by Jeremy Corbyn, a Sinn Fein sympathiser. But Mrs Foster’s very weakness will make it harder for her to cross her “blood-red” line against the Irish backstop.

Next are Tory MP s. The hardline European Research Group noisily opposes Mrs May’s planned deal. It claims the allegiance of 80 MP s, though insiders say just 40 would vote against. Another handful of MP s would prefer a softer Brexit or even no Brexit at all to Mrs May’s compromise. In facing down potential rebels, the Fixed-term Parliaments Act constrains Mrs May. She can no longer repeat the tactic, used by John Major to ram through the EU ’s Maastricht treaty in the 1990s, of turning votes into issues of confidence that, if lost, would trigger an election.

Then there are the opposition parties. The smaller ones will all vote against Mrs May’s deal. So will the official Labour opposition. The shadow Brexit secretary, Sir Keir Starmer, has set six tests that any plausible agreement will certainly fail. A clutch of pro-Brexit Labour MP s have been voting with the government. But with the DUP and plenty of hardline Tories threatening to vote the other way, they are too few in number to deliver victory for Mrs May.

That is why her advisers have been focusing on pro-European Labour MP s. To be sure of success, the government may need to win over as many as 20. At least that number are disillusioned with Mr Corbyn’s leadership and considering walking out of the party next year. Yet the pressure to defeat the government and maybe force an election will be strong. And the precedent of 1972, when Edward Heath needed the support of Jenkinsite Labour MP s to pass the European Communities Act, is not entirely happy. Less than a decade later, Roy Jenkins split from the party, leaving the Tories in power for 18 years.

The big question is: what happens if MPS vote down a deal? Mrs May used to insist it would mean leaving with no deal. She may try to bounce the Commons, by making a motion on the deal hard to amend. And she has rejected calls for a new referendum. But on the prospect of no deal, she said this week that “we would see what position the House would take in the circumstances of the time.” And she did not demur when one Tory MP declared that the House would refuse to back a no-deal Brexit and would have to step into the negotiations.