A Brexit deal which is seen to threaten the union between Britain and Northern Ireland could lead to civil disorder by loyalists, the head of the Police Service of Northern Ireland has warned.

Chief Constable Simon Byrne said that, depending on what happened with Brexit over the coming weeks, there was a potential among loyalist communities to "bring violence back on the streets".

There have been repeated warnings that any return of a hard border on the island of Ireland following Brexit could lead to attacks by dissident republicans.

But Mr Byrne said the PSNI had to be prepared that loyalists could react if they felt their position in the UK was under threat.

His warning follows fierce criticism of British Prime Minister Boris Johnson's Brexit agreement with the European Union by the DUP. The party has claimed the deal will leave Northern Ireland as a "semi-detached" part of the UK.

"It's well rehearsed that any hard border between Northern Ireland and the Republic will be seen as a return to state institutions by the nationalist community and it will raise the threat of attack towards infrastructure," Mr Byrne told BBC2's Newsnight.

"Our concern is also the loyalist community has at times shown it can mobilise quickly, bring large numbers of people on to the streets and engage in public disorder in support of their cause."

Depending on what happens with Brexit, Mr Byrne said there could be "a lot of emotion in loyalist communities and the potential for civil disorder".

"There are a small number of people in both the loyalist and nationalist communities that are motivated by their own ideology and that have the potential to bring violence back on to the streets."

"We need to make sure that we're in a position to thwart that sort of behaviour with the support of the communities and all parts of Northern Ireland," he added.

Meanwhile, the Tánaiste and Minister for Foreign Affairs has predicted that Irish companies may move north of the border such is the "extraordinary" competitive advantage the Brexit deal offers the region.

Simon Coveney said the terms of the agreement between the UK and EU presented an "exciting and genuine opportunity" for Northern Ireland to prosper.

Addressing a gathering of business leaders in Belfast, Mr Coveney said entrepreneurs would see the rewards of setting up in a region operating under single market rules but with tariff free access to the UK market.

"In time, when the politics of this settles down, business leaders will start to look at this for what it really is - which is an extraordinary business opportunity," he told the Belfast Chamber's annual lunch.

Mr Coveney said if that companies in the Republic were faced with any trade barriers into the UK market post-Brexit they would likely look north.

"I think there will be a huge incentive for a lot of Irish companies to locate north of the border and to effectively operate the rules of the single market but at the same time have unfettered access to the UK," he said.

"I think business models will look at those opportunities and adapt to change over time."

In his speech, Mr Coveney said a Brexit extension, if granted, was likely to be a flexible one that would allow the UK to leave the EU prior to the end of next January.

He said his Government would back an extension but cautioned that it was a case of "wait and see" if any of the other EU states raised "issues" with the move.

The Tánaiste also said the Irish and UK governments were committed to boosting investment in Northern Ireland post-Brexit, working together on major infrastructure projects.

Mr Coveney also addressed the wrangle over how the Stormont Assembly will consent to the Brexit deal.

A Stormont vote on whether to extend an initial four-year period for the post-Brexit arrangements will be done on the basis of a simple majority of MLAs.

The move has angered the DUP, which insists that consent must be on the basis of a majority of unionists and a majority of nationalists agreeing to back the move.

Mr Coveney said using the parallel consent model would lead to "paralysis".

"If cross-community support in the Assembly is required for any deal, the risk is paralysis, a zero sum game, and potentially no solution at all," he said.

"There is no way in my view to set up a cross-community vote that doesn't give one side or the other - and in some cases one party or one other - a practical veto."

Mr Coveney said many Irish businesses were raising questions over whether a "competitive advantage" for Northern Ireland had been deliberately designed into the agreement.

"I think that's a legitimate enough question but given the unique circumstances and pressure points of Northern Ireland through Brexit I think that's what we should be doing," he said.

Mr Coveney told the audience: "Entrepreneurship is about seeing the opportunity others miss. Where others only see risk, business leaders such as yourselves see the accompanying reward.

"I hope you can see that this deal provides an exciting and genuine opportunity for Northern Ireland while fully respecting the constitutional integrity of Northern Ireland as part of the UK."