The police and prison services in Northern Ireland have begun arranging for hundreds of extra holding cells in anticipation of protests at this summer's G8 summit turning ugly.
The contingency measures are being put in place as the security operation ahead of June's meeting of the world's most powerful political leaders in Co Fermanagh starts to ramp up.
The PSNI is expanding custody provision at a number of stations across the region.
It is understood commanders are also assessing the potential of using other sites to detain unruly demonstrators, among them the former Lisanelly British Army base in Omagh.
Aware that numerous arrests may well result in many charged suspects coming before the courts, the Northern Ireland Prison Service (NIPS) has taken complementary steps to increase its capacity to hold remand prisoners.
Work is under way to make available extra cell capacity inside Maghaberry high security prison in Co Antrim, as well as at Magilligan prison in Co Londonderry and Hydebank Wood young offenders' centre and women's prison in Belfast.
The currently unused 108-capacity Foyle House in Maghaberry will be the main facility used for charged demonstrators.
Additional accommodation for scores more prisoners will be provided in dormitory units inside Magilligan.
A ring of steel will be in place around the summit venue at the Lough Erne resort.
With the lakes of Fermanagh providing an additional natural barrier between the hotel and outside world, it is unlikely that protesters will get anywhere near the complex.
The demonstrators' focus may therefore shift to the town of Enniskillen, five miles away, or further afield in Northern Ireland. Indeed London may witness the largest protests.
But wherever pickets may materialise in Northern Ireland, security chiefs are preparing for trouble.
The customary challenges posed to such high profile summits by radical anti-capitalist groups will be added to by the on-going threat from dissident republicans opposed to the Northern Ireland peace process.
Dissidents have been blamed for abandoning a car bomb in Co Fermanagh last month and a series of hoax alerts in the county.
PSNI Chief Superintendent Pauline Shields said: "Part of the G8 planning process is to increase custody capacity in preparation for the G8 event.
"PSNI will seek to maximise cell capacity across our existing custody estate.
"We are confident, that in partnership with other agencies we can deliver a proportionate criminal justice response to support the G8 conference and any associated process."
A spokesman for the NI Prison Service said: "The Prison Service is working with partner organisations to ensure delivery of a safe and secure summit."
PSNI Assistant Chief Constable George Hamilton said police would have the capacity to detain 350 people by the time the G8 starts.
It is understood the Lisanelly base will be used to extend the current facilities at Omagh police station.
"As part of the G8 planning process it is the intention to increase custody capacity at Omagh to satisfy the G8 event," said Mr Hamilton.
"PSNI will seek to maximise cell capacity across our existing custody estate. Whilst still in the planning stages we anticipate that we will have the capacity to accommodate in excess of 350 detained persons at any one time."