Jeremy Corbyn has restated his support for the reunification of Northern Ireland and the Republic as he headed to Belfast for his first official visit.

The Labour leader’s spokesman said he believes most people across the island want the countries brought back together, adding that any change must happen through consent and that Mr Corbyn is committed to the Good Friday Agreement.

But the comments will raise eyebrows across the Irish Sea, where the Labour leader gave a speech on Thursday morning setting out his approach to post-Brexit customs and the Irish border.

It also comes as Labour is at odds with its Northern Irish sister party, the SDLP, which has warned that Mr Corbyn’s current approach to Brexit will not prevent a hard border being redrawn with the Republic.

Mr Corbyn is a prominent and long-time supporter of the unification of Ireland and his views have sometimes placed him at odds with official party policy.

Pressed on Mr Corbyn’s opinions on reunification, his official spokesman said: “Over the years he has made his position clear that the majority of those people across the whole island of Ireland wanted to see that outcome, a united Ireland.

“But in the context of the Good Friday Agreement that can only come about through that constitutional process that is laid down in the agreement and Jeremy fully supports that.”

House of Lords vote out proposal for 'checks and controls' at Irish border after Brexit

Under the terms of the Good Friday Agreement, a united Ireland will only occur with the majority consent of people in Northern Ireland and the Republic of Ireland.

In 1984, a decade before the first IRA ceasefire, Mr Corbyn met with Sinn Fein leader Gerry Adams in London and, a year later, he opposed the Anglo-Irish Agreement saying it strengthened rather than weakened the border.

Mr Corbyn’s spokesman said that during his visit to Belfast he would seek to “engage with all communities and people across Northern Ireland” on both the peace process and Brexit.

Asked later about the possibility of a border poll on Irish unity, Mr Corbyn sought to clarify his position, saying: “That will be a decision that could be made within the terms of the Good Friday Agreement. And if that is the wish, then clearly such a poll would happen. I’m not asking for it, I’m not advocating it.

“What I’m asking for is a return to the fullness of the Good Friday Agreement which would open up the opportunities and possibilities 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, and of course, the relationship with the Republic. And it’s quite clear that it’s there for a poll on both sides of the border, should that be something that is demanded.”

Following his initial comments, Downing Street was quick to highlight that Theresa May “has been absolutely clear about her commitment to the Union on a number of occasions”.

In his speech at Queen’s University Belfast, marking 20 years since the referendums that endorsed the Good Friday Agreement, Mr Corbyn called for the revival of power sharing at Stormont.

To help end the deadlock, Mr Corbyn called on the UK government to reconvene the British-Irish Intergovernmental Conference, which is provided for in the Good Friday Agreement.

DUP MP Sammy Wilson threatens the party will pull support from Theresa May's government if she backs down over post-Brexit Irish border

He declared that “Labour will not support any Brexit deal that includes a return to a hard border on this island.”

The leader argued that Labour’s proposed new “comprehensive UK-EU customs union, with a British say on future trade deals and arrangements, coupled with a new, strong relationship with the single market would prevent communities being divided”.

But the SDLP has already written to all Labour MPs urging them to defy Mr Corbyn’s will and back a plan to stay in the single market, saying it is the only way to avoid a hard border.

Brexit threatens life on the Irish border: in pictures Show all 15 1 /15 Brexit threatens life on the Irish border: in pictures Brexit threatens life on the Irish border: in pictures An abandoned shop is seen in Mullan, Co Monaghan. The building was home to four families who left during the Troubles. The town was largely abandoned after the hard border was put in place during the conflict. Mullan has seen some regeneration in recent years, but faces an uncertain future with Brexit on the horizon Reuters Brexit threatens life on the Irish border: in pictures A defaced ‘Welcome to Northern Ireland’ sign stands on the border in Middletown, Co Armagh Reuters Brexit threatens life on the Irish border: in pictures Mervyn Johnson owns a garage in the border town of Pettigo, which straddles the counties of Donegal and Fermanagh. ‘I’ve been here since 1956, it was a bit of a problem for a few years. My premises has been blown up about six or seven times, we just kept building and starting again,’ Johnson said laughing. ‘We just got used to it [the hard border] really but now that it’s gone, we wouldn't like it back again’ Reuters Brexit threatens life on the Irish border: in pictures Farmer Gordon Crockett’s Coshquin farm straddles both Derry/Londonderry in the North and Donegal in the Republic. ‘At the minute there is no real problem, you can cross the border as free as you want. We could cross it six or eight times a day,’ said Crockett. ‘If there was any sort of obstruction it would slow down our work every day’ Reuters Brexit threatens life on the Irish border: in pictures John Murphy flies the European flag outside his home near the border village of Forkhill, Co Armagh Reuters Brexit threatens life on the Irish border: in pictures Potter Brenda McGinn stands outside her Mullan, Co Monaghan, studio – the former Jas Boylan shoe factory which was the main employer in the area until it shut down due to the Troubles. ‘When I came back, this would have been somewhere you would have driven through and have been quite sad. It was a decrepit looking village,’ said McGinn, whose Busy Bee Ceramics is one of a handful of enterprises restoring life to the community. ‘Now this is a revitalised, old hidden village’ Reuters Brexit threatens life on the Irish border: in pictures Union Flag colours painted on kerbstones and bus-stops along the border village of Newbuildings, Co Derry/Londonderry Reuters Brexit threatens life on the Irish border: in pictures Grass reflected in Lattone Lough, which is split by the border between Cavan and Fermanagh, seen from near Ballinacor, Northern Ireland Reuters Brexit threatens life on the Irish border: in pictures Donegalman David McClintock sits in the Border Cafe in the village of Muff, which straddles Donegal and Derry/Londonderry Reuters Brexit threatens life on the Irish border: in pictures An old Irish phone box stands alongside a bus stop in the border town of Glaslough, Co Monaghan Reuters Brexit threatens life on the Irish border: in pictures Billboards are viewed from inside a disused customs hut in Carrickcarnon, Co Down, on the border with Co Louth in the Republic Reuters Brexit threatens life on the Irish border: in pictures Seamus McQuaid takes packages that locals on the Irish side of the border have delivered to his business, McQuaid Auto-Parts, to save money on postal fees, near the Co Fermanagh village of Newtownbutler. ‘I live in the south but the business is in the North,’ said McQaid. "I wholesale into the Republic of Ireland so if there’s duty, I’ll have to set up a company 200 yards up the road to sell to my customers. I’ll have to bring the same product in through Dublin instead of Belfast’ Reuters Brexit threatens life on the Irish border: in pictures A disused Great Northern Railway line and station that was for customs and excise on the border town of Glenfarne, Co Leitrim Reuters Brexit threatens life on the Irish border: in pictures Alice Mullen, from Monaghan in the Republic of Ireland, does her shopping at a former customs post on the border in Middletown, Co Armagh. ‘I’d be very worried if it was a hard border, I remember when people were divided. I would be very afraid of the threat to the peace process, it was a dreadful time to live through. Even to go to mass on a Sunday, you’d have to go through checkpoints. It is terribly stressful,’ said Mullen. ‘All those barricades and boundaries were pulled down. I see it as a huge big exercise of trust and I do believe everyone breathed a sigh of relief’ Reuters Brexit threatens life on the Irish border: in pictures A bus stop and red post box stand in the border town of Jonesborough, Co Armagh Reuters

Labour’s current position is that it “respects” the 2016 referendum, that Britain’s EU membership must end, that the country should remain outside the single market as it stands.

But Claire Hanna, the SDLP Brexit spokeswoman, wrote in a letter: “It is important to note that customs union membership alone will not prevent [an Irish] border.”

She wrote ahead of a vote in the Commons expected in the coming weeks on a plan to keep the UK in the European Economic Area, effectively meaning it would stay in the single market – which Mr Corbyn is refusing to back.

Ms Hanna added: “[A hard border] will only be prevented if we retain full access and full alignment with the single market and customs union. No other solution is possible.