The Labour leader said if he was to become prime minister, he would only trigger a border poll in line with the terms of the Good Friday Agreement - which stipulates that a vote can only be called if there is evidence that a majority in Northern Ireland would support reunification.

Mr Corbyn, who in the past made no secret of his support for a united Ireland, was pressed on the issue on his first visit to Northern Ireland as Labour leader.

He fielded questions from students at Queen's University in Belfast a day after his official spokesman said Mr Corbyn believed there was majority support for unification across the island of Ireland.

Sign up to our daily newsletter The i newsletter cut through the noise Sign up Thanks for signing up! Sorry, there seem to be some issues. Please try again later. Submitting...

Jeremy Corbyn at Queen's

A border poll, which would see separate votes north and south, can only be called if the UK Government believe a majority within Northern Ireland is in favour of unity.

Asked by a politics student whether he would call a referendum if he became prime minister, Mr Corbyn responded: "That would be a decision that would be made within the terms of the Good Friday Agreement.

"If that is a wish then clearly such a poll would happen.

"I am not asking for it, I am not advocating it. What I am asking for is a return to the fullness of the Good Friday Agreement which would open up the opportunity and possibility for the future of Ireland as a whole.

"That is the point of the Good Friday Agreement. Not direct rule, not imposition of a political view from Westminster but devolution of powers to Stormont here (in Belfast) and of course the relationship with the Republic.

"It's quite clear that it's there for a poll on both sides of the border should that be something that is demanded."

Earlier, Mr Corbyn warned that Northern Ireland stood at a potential crossroads between a strengthened peace or a return to the dark days of the past.

He urged Stormont leaders and the UK and Irish Governments to renew efforts to restore powersharing at the crisis-hit institutions in Belfast, insisting peace cannot be taken for granted.

Giving a lecture at Queen's to mark 20 years since the signing of the historic Good Friday peace agreement, Mr Corbyn said:

"As we stand here today in celebration of 20 years of peace, we must also recognise we are standing at a potential crossroads.

"It is right we celebrate the achievements, not least as it is those achievements we must use as a springboard for the 20 years to come.

"We must neither be complacent, nor reckless. So I want to send this message to the people of this island - Labour is as committed to the Good Friday Agreement as we have ever been.

"It has served us well for 20 years and, with commitment and determination, will provide us with the framework for the next 20.

"And with that in mind I want to make a plea to all parties and all sides. We must do all we can to make powersharing work again in Stormont. We need all sides to come together and make devolution work again.

"That means tough choices. It means compromise and give and take. But we owe it to the people of these islands not to allow political disagreements to open the way for any return to the grim days of the past."

Northern Ireland has been without a properly functioning powersharing government for more than 16 months due to a bitter stand-off between the two biggest parties, the DUP and Sinn Fein.

A row that broke out over a botched green energy scheme, and widened to encompass long-standing disputes such as the Irish language, gay marriage and Troubles legacy issues, shows no sign of resolution.

Mr Corbyn, who made clear his support for an end to the ban on same-sex marriage in the region, urged the revival of a contentious peace process mechanism to enable the UK and Irish governments to work together to save powersharing.

He called on Prime Minister Theresa May to reconvene the British Irish Intergovernmental Conference - a body that offers the Irish a consultative role in non-devolved matters concerning Northern Ireland.

Sinn Fein and the SDLP have been demanding the re-establishment of the conference, which last sat in 2007, as a means to plot a way forward amid the devolution crisis in Belfast.

However, unionists are wary of the body, and associated suggestions that the Irish Government could have a significant role in deciding the next steps for the region's rudderless public services.

DUP leader Arlene Foster has dismissed the conference as a "talking shop" and instead called for direct rule UK ministers to take decisions on Northern Ireland at Westminster until such time as a powersharing administration can be pieced back together at Stormont.

Mr Corbyn, who is spending two days in Northern Ireland, also used his speech at Queen's to make clear that Labour will not support a Brexit deal which results in the re-imposition of a hard border on the island.

He argued that the best way to avoid border checks is through a UK-EU customs union - which would offer the UK a say on future trade deals - coupled with a "new and strong relationship" with the EU single market.

"Driven by the free-market fantasists within their ranks, the reckless Conservative approach to Brexit is a very real threat to jobs and living standards here in Northern Ireland and risks undermining and destabilising the co-operation and relative harmony of recent years," said Mr Corbyn, who will visit the border on Friday.

"Labour will not support any Brexit deal that includes the return of a hard border to this island. But we are also clear there must be no 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.

"Let's not give up years of hard-fought co-operation and stability for the pipe-dream prize of race-to-the-bottom free trade deals with the likes of Donald Trump.

"Opposition to the idea of bringing back a hard border to this land isn't just about avoiding paperwork or tariffs - important though that is - it's about deep rooted cultural and community ties.