MEPs have called for "the unique position of and special circumstances" of the island of Ireland to be addressed in any Brexit agreement.
A European Parliament motion passed on Wednesday refers to "the absolute need to ensure continuity and stability of the Northern Ireland peace process".
It calls on negotiators "to avoid a hardening of the border".
EU chief negotiator Michel Barnier said he would work for arrangements that do not threaten the peace process.
He said any such arrangements must be compatible with EU law.
The motion setting out the European Parliament's position for the Brexit negotiations was passed by 516 to 133.
Although MEPs will not participate directly in the exit talks they will have to vote in favour of the final deal for it to go ahead.
It set out general principles at the start of the two year negotiations for the UK to leave the European Union under the Article 50 process.
At one point, Ulster Unionist MEP Jim Nicholson told Mr Barnier to stop "twiddling with your telephone" during the debate.
Mr Nicholson said that Dublin did not speak for Belfast on Brexit negotiations, adding: "We will take care of ourselves".
The UUP would accept neither a hard border between the Irish Republic and Northern Ireland, nor an internal border within the UK, added Mr Nicholson.
He urged EU leaders not to heed those who, he said, wanted to use Brexit as an excuse to attempt to break up the UK.
He also acknowledged that the EU had been a strong friend to Northern Ireland "during our darkest days", saying that while all sides wanted a frictionless border this would require innovative thinking.
Sinn Féin MEP Martina Anderson challenged the Taoiseach (Irish prime minister) Enda Kenny to stand up for the Good Friday Agreement and act as the voice of the Irish people, north and south, in the Brexit negotiations.
Ms Anderson said she was glad MEPs had taken on concerns voiced by the late Martin McGuinness in drafting the sections of their resolution dealing with Ireland.
DUP MEP Diane Dodds said she appreciated there was genuine sadness, disappointment and even anger in the European Parliament over Brexit, but she insisted that the triggering of Article 50 had been a good day for democracy in the UK.
Mrs Dodds said any Brexit deal must respect that Northern Ireland will be an "integral part of an independent UK".