A draft declaration by the EU will state that "the entire territory" of a united Ireland would be part of the European Union in the event of a successful future referendum on unity.

The draft, seen by RTÉ News, declares that such a move would be "in accordance with international law".

The declaration is designed to ensure that should reunification occur, Northern Ireland would automatically rejoin the EU.

It follows intense lobbying by the Government.

RTÉ News understands that all 27 EU members will accept the declaration at an extraordinary summit on Brexit tomorrow.

The UK has been excluded from the summit, which has been called to confirm the principles and objectives that will guide the two-year Brexit negotiation process.

The declaration reads: "The European Council acknowledges that the Good Friday Agreement expressly provides for an agreed mechanism whereby a united Ireland may be brought about through peaceful and democratic means.

"[I]n this regard, the European Council acknowledges that, in accordance with international law, the entire territory of such a united Ireland would thus be part of the European Union."

The declaration is understood to have prompted a frosty response from the British government.

A Downing Street source told the Financial Times: "Northern Ireland’s constitutional position as part of the UK is based firmly and clearly on the freely given consent of its people. The UK government has consistently upheld the principle of consent regarding Northern Ireland’s future.

"It is clear that the majority of the people of Northern Ireland continue strongly to support the current political settlement, including Northern Ireland’s continuing position within the UK."

It is understood the declaration on Irish unity was agreed by EU ambassadors ahead of tomorrow’s meeting.

The text does not form part of the formal negotiating guidelines, but will instead be included in the minutes of the European Council meeting.

Government legal sources are confident that an automatic re-entry of Northern Ireland would comply with Articles 52 and 355 of the Lisbon Treaty.

The latter article refers to how EU law does, or does not, apply in all the assorted territories, dependencies and former colonies of EU member states.

Article 52 refers to the countries, including Ireland, where EU law applies.

Government sources have said the move is not designed to trigger a border poll, and that the Taoiseach does not believe the time is right for such a referendum.

Senior EU sources have pointed out that the spirit of the declaration is reflected in a letter from the British Brexit Secretary David Davis to Mark Durkan of the SDLP in March.

The EU27 will take a significant step closer to the EU-UK negotiations tomorrow when they adopt the formal negotiating guidelines.

Included in the guidelines, the first draft of which was published by European Council President Donald Tusk on 31 March, is a paragraph on Ireland, in which the heads of government will reaffirm their support for the Good Friday Agreement and the peace process during the Brexit negotiations.

The paragraph also says that "flexible and imaginative solutions" will be required to avoid a hard border "while respecting the integrity of the [European] Union legal order".

Irish sources point out that the declaration on Irish unity is separate from the guidelines, and that the unity provisions, or the Good Friday Agreement will not form part of the actual Brexit negotiations.