Brexit could be "painful" for both Britain and Ireland, the Irish foreign minister has warned.
Charlie Flanagan also called the Brexit vote "a bad decision", adding that Ireland should not be placed at more of a disadvantage than the UK as a result of its decision to leave.
He also urged the UK and the EU to maintain the common travel area between Northern Ireland and the Republic in order to protect the Belfast Agreement, which he dubbed "the foundation stone of our peace".
His comments came after Theresa May warned European Council president Donald Tusk that the sovereignty of Gibraltar would not be up for negotiation in the Brexit talks.
The future relationship between the north and south in Ireland is emerging as one of the most complex areas of Britain's split from the European Union, where the UK has its only land border with the bloc.
Mr Flanagan told BBC Two's Newsnight: "I believe it's important, in our context, that we have a situation at the end of these negotiations in two years' time, or maybe even longer, where a member of the European Union, namely Ireland, cannot be placed in a position of more disadvantage than somebody who is leaving."
Asked if he thought leaving the EU would be painful for Britain, Mr Flanagan said: "I do, I believe it's going to be painful for Britain, I believe it's going to be painful, potentially, for Ireland."
Mr Flanagan went on to say it was "absolutely essential" that there was no return to a hard border between the north and south of Ireland.
He added: "The Good Friday Agreement remains the foundation stone of our peace, and anything adverse to that agreement will not be acceptable."
The Irish minister of state said he believed there was no intent to punish Britain among EU members, while the relationship between the UK and the Republic of Ireland was now at its "warmest ever".
He added: "I believe it (Brexit) was a bad decision, but of course as a democrat I fully respect and recognise the will and wishes of the British people. We've got to deal with that now.
"The Article 50 process has commenced, and I believe it's essential now that we get through the negotiations in such a way that the end result can be as close as possible a relationship between the European Union and the United Kingdom, albeit with the UK gone."
On Thursday Mrs May met Mr Tusk for the first time since triggering Article 50, as both sides sought clarity on the issue of Gibraltar.
Mr Tusk suggested last week that Spain - which also claims sovereignty of Gibraltar - could veto its inclusion in any trade deal between Britain and the remaining EU member states.
The move caused fury in Gibraltar - which accused the EU of "bullying" - while former Conservative Party leader Lord Howard even suggested Mrs May could go to war to defend the Rock.
In a statement following the meeting, a No 10 spokesman said the Prime Minister had been clear she was determined to achieve the "best possible deal" for Gibraltar as well as the UK.
"The PM also made clear that on the subject of Gibraltar, the UK's position had not changed: the UK would seek the best possible deal for Gibraltar as the UK exits the EU and there would be no negotiation on the sovereignty of Gibraltar without the consent of its people," the spokesman said.
EU sources said it had been a "good and friendly" meeting, with the talks running on for almost two hours.
"They agreed to stay in regular contact throughout the Brexit process to keep a constructive approach and seek to lower tensions that may arise, also when talks on some issues like Gibraltar inevitably will become difficult," one source said.