Former British prime ministers Tony Blair and John Major warned this afternoon that a vote to leave the European Union on 23 June would jeopardise the unity of the United Kingdom.

They said it would undermine peace in Northern Ireland and bolster the Scottish independence movement.

Speaking together in Northern Ireland, the former Labour and Tory leaders, who both played important roles in the peace process, warned that unity was effectively on the ballot paper.

"Throw away the membership of Europe and don't be surprised if in the end, as a consequence, we accidentally throw away our union as well," Mr Major, Conservative prime minister from 1990 to 1997, told students at Ulster University in Derry.

"The most successful union in world history could be broken apart for good," he said.

Mr Major warned that if Scotland votes to stay and the rest of the United Kingdom votes to leave, the pressure for a new referendum on Scottish independence "could prove to be uncontrollable and politically irresistible".             

Scots rejected independence by 55-45% in a vote in 2014 but since then the Scottish National Party has gained further strength, taking 56 of the 59 seats representing Scotland in the national parliament in London in last May's national election.

"If the UK was outside the European Union I could well envisage a different result" Mr Major added.

Mr Blair said the referendum could also undermine the 1998 Northern Ireland peace deal that ended three decades of violence between nationalists and loyalists. Over 3,600 died in the conflict.

"If we were to leave on June 23, it would put ... Northern Ireland's future at risk, it would put our union at risk, it would be deeply damaging, a reckless course," said Mr Blair, who oversaw the peace deal as Labour prime minister from 1997 to 2007.

Mr Blair said the European Union and free travel and trade on the island of Ireland had been an important factor in securing the peace deal in 1998 and that it would be "profoundly foolish to play any form of risk with those foundations of stability".

Theresa Villiers, an opponent of EU membership who serves as Britain's minister for Northern Ireland, said the comments by Mr Blair and Mr Major were irresponsible.

"Whatever the result of the referendum, Northern Ireland is not going back to the troubles of its past and to suggest otherwise would be highly irresponsible," Ms Villiers said.