A former head of MI5 has warned that she is "desperately worried" about the impact of Brexit on the security situation in Northern Ireland.
Baroness Manningham-Buller also said the UK will be "less safe" if it leaves the EU without a deal with Brussels.
She was speaking as two former Northern Ireland police chiefs warned that dissident republicans are ready to exploit the chaos around Brexit to launch a new wave of terror.
Baroness Manningham-Buller succeeded Sir Stephen Lander as director general of the Security Service in 2002, the second woman to take on the role after Dame Stella Rimington.
Following recent attacks by dissident republicans, Baroness Manningham-Buller voiced particular concern about the impact on the security situation on the island of Ireland.
She said: "I am desperately worried. Much of my career was spent working on Provisional IRA, the loyalist terrorist groups in Northern Ireland.
"I can remember when it was thoroughly unpleasant to go through the border and now, if we go back to that, it cuts off the increasing links between Northern Ireland and the Republic which are an important part of the message of the peace process.
"It will alter dramatically the whole sentiment and politics of Northern Ireland."
She added: "Throughout the time there has been those who don't agree with the peace process, who are continuing to mount attacks - generally small scale.
"But I don't think it is over in Northern Ireland. The danger is that it gets much worse again."
Baroness Manningham-Buller said the country faced a range of security issues - from terrorism to threats from Russia - which were best dealt with in a "European context".
She said a no-deal Brexit should be avoided "at all costs" and that she was "more than sympathetic" to attempts by backbench MPs to take control of Commons business to prevent it happening.
"I, as a former member of MI5, am very concerned about the loss of things like the European Arrest Warrant, the loss of access to Europol data and so on," she told BBC Radio 4's World At One.
"If we leave without a deal we are going to be less safe.
"We have a very serious terrorist problem in this country, very serious other security issues - the rise of Russia, its interference in our elections.
"I am pretty queasy that (Russian President Vladimir) Putin is so in favour of Brexit - I think that should give us all pause.
"There is a range of other security issues - we all face the same one - which are dealt with better in a European context than not."
Former Assistant Chief Constable Alan McQuillan yesterday told this newspaper that some are "hitching themselves to the Brexit bandwagon" to stoke trouble.
"The reality is they are always dangerous and they will use fears over a hard border to try and ramp up their activities," he said. "The dissidents are hitching themselves to the Brexit bandwagon. I think there will be further attacks, I think they remain dangerous. But I don't think they'll succeed."
His warning came as former PSNI Chief Constable Hugh Orde said dissident republicans would view a hard border as an opportunity to mount further attacks.
He accused politicians of not paying enough attention to the potential for a return to violence in the event of a hard border and he said there is no way to avoid the return of security patrols in the event of a no-deal Brexit.
"At the moment you see anything that starts to create the perception of a hard distinction between north and south, it creates a catalyst that allows people to exploit that position and dissident republicans would be in that category," he told RTE's This Week programme.