David Davis, the Brexit secretary, left, has conceded that under the terms of the Good Friday agreement the government is obliged to offer Northern Irish voters a referendum on reuniting the country within the EU should polls show support for it

Northern Ireland has the right to leave the United Kingdom and join the European Union as part of the Republic after Brexit, ministers have conceded for the first time.

In another blow to Theresa May’s efforts to keep the union together, ministers have concluded that Northern Ireland would not have to reapply for EU membership as a new country if it voted for reunification.

It comes as civil servants prepare to take control of Northern Ireland’s budget from tomorrow after the failure of political parties in the province to restore powersharing.

James Brokenshire, the Northern Ireland secretary, said that Sinn Fein and the Democratic Unionist Party would have a “short window” to resolve their differences and that there would be “consequences” unless a new powersharing