Jeremy Corbyn has told the BBC that if he is prime minister the UK government would take a neutral position in any border poll campaign.
He said he was not asking for or advocating a border poll, but would ensure the Good Friday Agreement is implemented "to the letter".
Mr Corbyn is on his first trip to NI since becoming Labour leader.
He also used his speech at Queen's University in Belfast to argue that Brexit must not lead to a hard border.
The leader of the opposition told his audience he was not asking for a border poll, but in an interview with the BBC he was asked how a Corbyn government would handle such a campaign if it happened on his watch.
"It's within the terms of the Good Friday Agreement that such a poll could be held if there was a willingness to do so, at that point you don't stand in its way, but it is within the terms of the Good Friday Agreement and I think the UK government should be neutral in that respect," he replied.
David Cameron's Conservative government campaigned for Scotland to remain in the UK ahead of the Scottish independence referendum in 2014, but Mr Corbyn said he would not take that approach.
"I think there has to be a decision within terms of the Good Friday Agreement, we're dealing with conjectures here, we're quite a long way off from any of this.
"We would be ensuring the Good Friday Agreement is carried out to the letter."
Much of his speech at Queen's University focused on Brexit, arguing that it must not be allowed to damage the fragile political settlement in Northern Ireland.
He also said there should not be a border in the Irish Sea.
"Let me be clear, Labour will not support any Brexit deal that includes the return of a hard border to this island," Mr Corbyn said.
"We are also clear there must be no effective border created in the Irish Sea either.
"That is why Labour has put forward a plan that would go a long way to solving this issue, a plan for which I believe there is a majority in Westminster."
'Symbol of peace'
The UK and EU have agreed that there will be no hard border, but are at odds on how to achieve that.
A major sticking point is what arrangement will be put in place if the border cannot be solved in an overall deal.
The two sides accept the need for a 'backstop', but differ on how it should work.
Mr Corbyn suggested that Labour's proposal for a new comprehensive EU-UK customs union has the potential to prevent communities in Northern Ireland being divided.
The Labour leader also argued that maintaining an open border is not just about avoiding paperwork or tariffs. It also has symbolic significance, he said.
"An open border is a symbol of peace, two communities living and working together after years of conflict, communities who no longer feel that their traditions are under threat," Mr Corbyn said.
Mr Corbyn also said a solution must be found to end the deadlock at Stormont.
Northern Ireland has been without a government since January 2017, when power-sharing between the Democratic Unionist Party (DUP) and Sinn Féin collapsed.
He called for the British Irish Intergovernmental Conference (BIIC) to be revived in order to help make progress.
"The British and Irish governments met many times during the last impasse - it seems to me a sensible way forward," he told the BBC.
"We must step up to find a creative solution in the spirit of the Good Friday Agreement that avoids a return to direct Westminster rule," Mr Corbyn commented.
Convening the BIIC is favoured by nationalists, but opposed by the DUP and the Ulster Unionist Party (UUP) who regard it as a "talking shop".
During Mr Corbyn's two-day visit to Northern Ireland, he will also meet business leaders in Belfast and Londonderry to discuss their concerns around Brexit.
Corbyn visit not without criticism
By Jayne McCormack, BBC News NI Politics Reporter
The welcome Jeremy Corbyn received at Queen's University was almost as warm as the weather.
His speech was interrupted by rounds of applause from the audience several times, notably when he paid tribute to Mo Mowlam - the late Northern Ireland secretary - for her role in the Northern Ireland peace process.
The speech did not make reference to a border poll, but afterwards Mr Corbyn was asked if he would support such a move if elected prime minister, by an A-Level student sitting her politics exam this afternoon.
Mr Corbyn wished the student good luck and said if that was the desire of the majority of people, then it would happen under the terms set out in the Good Friday Agreement, but that he was not asking or advocating for it.
His trip so far has not been without criticism as the DUP East Londonderry MP Gregory Campbell accused Mr Corbyn of snubbing a request to meet with IRA victims.
Labour said it hadn't received enough notice, but that the shadow Northern Ireland Secretary of State Tony Lloyd has taken up the invite on behalf of his party leader.
Earlier this week, the Labour Party in Northern Ireland said it was disappointed that Mr Corbyn had not made plans to meet them during his visit.
A Labour source said the party was in communication with Labour NI and would "be in touch to arrange a future meeting".
People in Northern Ireland have been allowed to join Labour since 2003, and they have had their own constituency branch since 2008.
Whether they can contest elections is currently subject to an internal review, which is understood to be in its final stages, but any decision to change the current policy would need to be taken by Labour's National Executive Committee (NEC).