An organiser adjusts the British flag, prior to the EU leaders’ summit on Brexit, in Brussels, Belgium. Photograph: John ThysAFP/Getty Images

EU leaders have unanimously approved tough guidelines for negotiations on Brexit, including a commitment to protecting Ireland’s interests and a guarantee that Northern Ireland could rejoin the EU as part of a united Ireland. Video: REUTERS

The Taoiseach was careful to avoid any hint of triumphalism at the end of Saturday’s special EU summit on Brexit in Brussels, describing the adoption by European leaders of negotiating guidelines as “an important milestone” at the beginning of “a long and difficult process”.

But the guidelines represent an important achievement for Ireland, identifying the future of the Border, the peace process and the Common Travel Area among the EU’s priorities in its forthcoming negotiations with the UK.

“We in Ireland have essentially converted our hopes into European hopes and aspirations and I don’t think we could have wished for such a good start. But it’s only a start,” said Minister of State for European Affairs Dara Murphy.

The prominence of Ireland’s issues in the EU’s guidelines, including a statement guaranteeing that Northern Ireland could automatically rejoin the EU as part of a united Ireland, is the product of an unprecedented political and diplomatic effort that began even before the UK voted to leave the EU.

The State’s efforts have required strategic planning, detailed analysis, cunning and the cultivation and exploitation of personal relationships.

When David Cameron announced a UK referendum on its EU membership, the Government decided that, unlike in the 2014 vote on Scottish independence, the Republic would actively advocate for a Remain vote.

Ahead of the campaign, Irish officials made assessments of the potential impact of Brexit on the economy, trade, the Border, the peace process and the movement of people between Britain and Ireland.

So when Britain voted to leave, the State was better prepared than most other EU member states to make its concerns heard in Brussels and other European capitals.

The Taoiseach, Minister for Foreign Affairs Charlie Flanagan and Mr Murphy led the political offensive with a round of visits to European capitals, where their meetings were not confined to discussions with their ministerial counterparts.

“One: to try and identify what the concerns and issues of other countries were. Secondly, to establish where we had shared concerns with other member states.”

At the same time, Irish diplomats were engaging in a parallel exercise, identifying each of the centres of power within the EU and making the Irish case to them one by one.

Led by John Callinan in the Department of the Taoiseach, Rory Montgomery at the Department of Foreign Affairs and Declan Kelleher, the State’s permanent representative to the EU, scores of officials sought out useful counterparts throughout Europe and its institutions.

“Nobody was too unimportant for the Irish to talk to,” said one senior European Commission official.

Breaking Barnier There was one figure who was more important than any other, however - the EU’s chief Brexit negotiator, Michel Barnier.

A former French minister for agriculture and EU commissioner for regional policy, Barnier had a long political and personal association with Ireland and viewed the peace process as an important European achievement.

In the months after the Brexit referendum, he had numerous meetings with Irish ministers and TDs, and Irish officials in Brussels maintained constant contact with his Brexit taskforce.

Up to a dozen delegations from Dublin came to Brussels for technical briefings with Barnier’s officials, outlining Ireland’s concerns and providing detailed assurances that they could be addressed within the framework of the EU treaties.

Then Phil Hogan went to a funeral. The EU agriculture commissioner’s staff in Brussels were surprised when he told them he was travelling to Orléans to attend the funeral of Xavier Beulin, a French farmers’ leader.

They seemingly didn’t understand the irresistible attraction of such events for an Irish politician.

At the funeral, Barnier greeted Hogan at the cathedral and introduced him to a succession of top French politicians, including Nicolas Sarkozy and Emmanuel Macron.

Hogan and Barnier bonded, and the Irish commissioner managed to open other doors at the Berlaymont for his colleagues in Dublin.

The European Commission president, Jean-Claude Juncker, and his powerful chief of staff Martin Selmayr also proved to be sympathetic to the Irish cause.

Mr Murphy stresses the importance of personal relationships in the campaign, the cultivation of which is a traditional strength of Irish diplomacy.

“Declan Kelleher has been here for a number of years. He’s our senior diplomat globally, really, and that’s not a slight on anyone else.

“He and his counterparts in Brussels meet on a weekly basis and they know each other well,” Mr Murphy said.

The State’s EU partners have not, however, offered their support for sentimental reasons alone, and they will expect reciprocation when the time comes.