British Prime Minister Theresa May got a reprieve in one of her Brexit battles Tuesday as party rebels said they did not yet have the strength for a leadership challenge. But she faced a new headache as parliamentary allies warned they could remove support from May’s minority government if she does not alter her divorce deal with the European Union.

Northern Ireland’s Democratic Unionist Party struck a deal last year to back May’s Conservatives on major legislation. But the Protestant, pro-U.K. party opposes the Brexit deal’s plans for keeping the border between Northern Ireland and EU member Ireland open after Brexit, saying it weakens the ties binding the U.K. by creating separate trade rules for Northern Ireland.

In a warning to May, DUP lawmakers abstained or opposed the government during several votes on a finance bill late Monday.

DUP lawmaker Sammy Wilson said the votes were “designed to send a political message to the government: Look, we’ve got an agreement with you but you’ve got to keep your side of the bargain.”

May defended her deal in an article for Tuesday’s Belfast Telegraph, saying it “puts Northern Ireland in a fantastic position for the future.”

She said businesses would benefit because Northern Ireland would “be a gateway to both the EU market and the rest of the U.K.’s market.”

In better news for the beleaguered British leader, a leading pro-Brexit lawmaker acknowledged that the rebels haven’t mustered the numbers for a leadership challenge.

Jacob Rees-Mogg is one of a group of Conservative legislators who have written letters calling for a no-confidence vote in the prime minister. They say the draft divorce deal would leave Britain tied to the bloc’s rules without any say in making them.

The group has previously said it was confident of getting the 48 letters — from 15 percent of Conservative lawmakers — needed to spark a leadership challenge.

“Patience is a virtue, virtue is a grace,” Rees-Mogg said Tuesday. “We shall see whether letters come in due time.”

The draft agreement reached last week triggered an avalanche of criticism in Britain and left May fighting to keep her job even as British and EU negotiators raced to firm up a final deal before a summit on Sunday where EU leaders hope to rubber-stamp it.

The 585-page, legally binding withdrawal agreement is as good as complete, but Britain and the EU still need to flesh out a far less detailed declaration on their future relations.

May’s office said she would meet European Commission President Jean-Claude Juncker in Brussels on Wednesday as part of work to finalize the declaration.

EU leaders have largely welcome the deal, but Spain has expressed concerns, saying the wording leaves unclear how Gibraltar, the British territory at the southern tip of the Iberian Peninsula, would be dealt with.

Spanish Prime Minister Pedro Sanchez said Tuesday that his country would vote against the divorce agreement if Gibraltar’s future isn’t considered a bilateral issue between Madrid and London.

Sanchez told a business forum in Madrid that Spain “cannot accept that what will happen to Gibraltar in the future depends on negotiations between the U.K. and the EU. It will have to be something that we define and we negotiate and agree between the U.K. and Spain.”

If the EU approves the deal it needs to be passed by the European and British Parliaments.

The parliamentary arithmetic looks daunting for May, and if lawmakers reject the agreement in a vote expected next month, the U.K. would face a political crisis, with Brexit day looming.

Bank of England policymakers warned Tuesday that business concern was growing about the prospect of the country crashing out of the European Union without a deal.

Chief economist Andy Haldane said Brexit uncertainty is the “single largest headwind” to the British economy.

© The Associated Press. All rights reserved.