LONDON — Donald Tusk, the president of the European Council, said on Wednesday that negotiators would know “in seven to eight hours” whether Britain had struck a deal to leave the European Union, setting the stage for down-to-the-wire talks that could shape the fate of Brexit.
But a spokesman for Prime Minister Boris Johnson of Britain said a number of issues were still yet to be resolved, as talks continued between his office and unionists from Northern Ireland whose support was crucial to any deal.
“Theoretically, in seven to eight hours everything should be clear,” Mr. Tusk said to reporters in remarks broadcast on Poland’s TVN24. “Yesterday evening, I was ready to bet that it’s all set and agreed. Today, there are certain doubts on the British side.”
But he said an agreement could be reached as soon as Thursday, in time for the opening of a summit meeting of European leaders. “It is still undergoing changes, and the basic foundations of this agreement are ready, and theoretically, we could accept a deal tomorrow,” he said.
Despite Mr. Tusk’s optimistic tone, analysts said it was far from clear whether a deal could be reached by Wednesday night. Some European officials were predicting that the two sides would not be able to close the gap on customs issues in time.
And after a meeting of Mr. Johnson’s cabinet on Wednesday, some lawmakers said there was still work to be done.
Any deal must still clear several hurdles, including getting approval from Europe’s leaders and, most crucially, passage in the British Parliament, where Mr. Johnson’s predecessor, Theresa May, suffered three thunderous defeats after bringing back an agreement with Brussels.
For days, Mr. Johnson has worked frantically to bridge a gap over the issue of how to treat Northern Ireland in a post-Brexit Europe — a fiendishly complex issue that helped torpedo Mrs. May’s agreement and that could still fracture Mr. Johnson’s Conservative-led coalition in Parliament.
Mr. Johnson has given significant ground on the structure of a customs union that would allow Northern Ireland, which is part of the United Kingdom, to continue to trade seamlessly with Ireland and other members of the European Union, according to people briefed on the talks.
But several sticking points remained, including how much of a say unionist lawmakers in Northern Ireland would have over its future trading arrangements.
Leo Varadkar, the Irish prime minister, said a Brexit deal appeared possible, but it was not clear by when.
“The question is whether the negotiators will be able to bridge the remaining gaps in advance of tomorrow’s council,” he told Irish lawmakers on Wednesday.
Mark Landler and Stephen Castle contributed reporting.