The future of west Cork's only acute mental health unit has been secured, following an agreement between the Mental Health Commission and the HSE.
The Centre for Mental Health Care and Recovery is located on the campus of Bantry General Hospital and serves a catchment population of around 60,000 people.
There were concerns for the future of the unit when the Mental Health Commission instructed the HSE to reduce the maximum number of patients who could be treated there by one third, due to what the commission described as "critical" deficiencies in the building which houses the unit.
Following an inspection of the unit in Bantry, the commission instructed the HSE to reduce the number of people who could be treated there from 18 to 11.
The HSE appealed the imposition of this condition to the district court.
In court today, the HSE withdrew its appeal and gave undertakings to complete works to address ligature risks and to make the building safer and more appropriate for residents.
At an earlier hearing, HSE solicitor Katherine Kelleher told the court that up to €1.5 million would be provided for work on the building to include the removal of risks there, such as ligature points.
On the basis of undertakings given to the Mental Health Commission, it's now prepared to allow the unit to continue operating, with a maximum occupancy of 15 people.

The commission says the HSE has agreed to limit the number of residents at the unit until all work there has been completed and the building is brought into compliance with regulatory requirements.
The Mental Health Commission has warned that any failure on the part of the HSE to comply with the revised condition would be an offence under the Mental Health Acts.
Mental Health Commission Chief Executive, John Farrelly, said conditions at the unit in Bantry will continue to be monitored to ensure patients there are safe.
"We have revised the condition as we have received sufficient reassurances and commitments from them that will address the issues at hand," Mr Farrelly said.
The Mental Health Commission is the regulator for the acute mental health sector in this country.
It conducts annual inspections and issues reports on its findings. These reports are public documents and are available for inspection on the commission's website.
RTÉ News understands that the Mental Health Commission has been concerned for some time about the physical infrastructure at the building which houses the acute mental health unit in Bantry.
It's understood that the commission was reluctant to impose the condition restricting patient numbers at the unit in Bantry, but felt it had no alternative after a number of calls it made in previous inspection reports on the unit had been largely ignored by the HSE.
In its report on Bantry in 2021, the Mental Health Commission described the non-compliance of the building housing the unit there as "critical".
And, when inspectors returned and found that those deficiencies hadn't been addressed, a decision was made to attach a condition to the unit's registration to reduce the maximum number of patients who can be accommodated there from 18 to 11.
In a statement this afternoon, the HSE said the executive had engaged with the Mental Health Commission "in a positive manner" regarding the Centre for Mental Health Care and Recovery in Bantry.
"We are absolutely committed to maintaining and continuing a quality service at the Centre and meeting our regulatory obligations," a spokeswoman for the HSE's Cork Kerry Community Healthcare told RTÉ News.
"Occupancy at the Centre will reduce temporarily while we carry out planned works," the spokeswoman said, adding that the work would be completed within "as short a timeframe as possible".