Taoiseach Enda Kenny has for the first time opened the door to a future referendum on Irish unity.

In a significant move, Mr Kenny called on the European Union to prepare for the prospect of Northern Ireland seeking to join the Republic.

The Fine Gael leader said a future border poll was now possible in light of the decision by Britain to leave the EU.

And Mr Kenny even likened it to West and East Germany after the fall of the Berlin Wall.

"The discussion and negotiations that take place over the next period should take into account the possibility, however far out it might be, that the clause in the Good Friday Agreement might be triggered," he said, "in that if there is a clear evidence of a majority of people wishing to leave the United Kingdom and join the Republic, that should be catered for in the discussions.

"Because if that possibility were to happen, you would have Northern Ireland wishing to leave the United Kingdom, not being a member of the European Union, and joining the Republic, which will be a member of the EU."

The Taoiseach made the remarks to reporters following his speech at the MacGill Summer School in Glenties, Donegal.

He alluded to the prospect of a border poll during off-script comments and agreed to clarify the remarks afterwards.

The Taoiseach told an audience that the North-South trade links were more important in terms of volume to the North, which would suggest an appetite for such a vote there.

Mr Kenny also suggested that the Common Travel Area had a "legal status" and officials were working to clarify this.

He later said there had once been the view that it would "impossible" for Britain to leave the EU but this had now been thrown on its head. The Taoiseach said the matter of a border poll must now be considered in negotiations on Brexit.

"So in the same way as East Germany was dealt with when the wall came down, was able to be absorbed into West Germany and not to have to have to go through a torturous and long process of applying for membership of the European Union," the Taoiseach said.

"So when Northern Ireland voted to stay (in the EU), who knows what might happen in the time ahead? I am just making the point that these are the kinds of things that should be looked at in the broadest of ways in discussions that take place.

"People said it would be impossible that Britain would leave the European Union; that has taken place now."

He said discussions would take place about the "connections between the Republic and Northern Ireland, between Northern Ireland and the UK and the EU and our relationship with both" and "these are things that should be looked at in the context that they might happen in some time in the future".

The decision by Mr Kenny to throw open the prospect to a border poll will set him on a collision course with the DUP.

A fortnight ago, Mr Kenny was left humiliated after the Government's attempts to establish an all-island forum was shot down by First Minister and DUP leader Arlene Foster.

The newly appointed Secretary of State to Northern Ireland, James Brokenshire, has also ruled out a border poll.

Sinn Féin has embarked on a campaign to have such a vote, but Fianna Fáil leader Micheál Martin said a vote was unlikely in the near future.

Earlier, Mr Kenny said a second secretary-general in the Department of An Taoiseach would be appointed to deal with the Brexit talks.

Meanwhile, speaking in Brussels, Foreign Affairs Minister Charlie Flanagan insisted that Germany had not slapped down Ireland's bid for special treatment in Brexit negotiations.

"I'm satisfied that Ireland's position and the unique relationship within the EU... is fully appreciated by my European colleagues, including Angela Merkel," said Mr Flanagan.