BRUSSELS — Britain and the European Union agreed on the draft text of a Brexit deal on Thursday, an 11th-hour breakthrough in Prime Minister Boris Johnson’s effort to settle his country’s anguished, yearslong debate over Brexit and pave the way for its departure from the bloc.
The deal must still clear several hurdles, including 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. The support of Northern Ireland’s Democratic Unionist Party, seen as vital to the passage of the agreement in Parliament, was not assured.
Mr. Johnson said on Twitter that the parties had reached a “great new deal that takes back control” and that Parliament would now be clear to vote on the agreement on Saturday.
Jean-Claude Juncker, the European Commission’s president, confirmed that a deal had been reached and noted that a revised arrangement on Northern Ireland had been agreed on.
He wrote on Twitter: “Where there is a will, there is a #deal — we have one! It’s a fair and balanced agreement for the EU and the UK.”
Britain’s frantic efforts to negotiate a Brexit agreement with the European Union had appeared to hit a last-minute snag, after the D.U.P. said in a statement on Thursday morning that it could not support the deal “as things stand.”
The statement, hours before Mr. Johnson was to present the deal to European leaders at a summit meeting in Brussels, suggested that domestic politics once again threatened to torpedo the complex negotiations.
It was unclear whether the deal had been altered before the agreement with European leaders was reached. It was also unclear whether the Northern Irish party simply wanted to make a show of holding out for its position before ultimately acquiescing — or whether Mr. Johnson faced a serious rebellion from the skeptics in his ranks.