All non-urgent operations in Dublin's Beaumont Hospital today and tomorrow have had to be cancelled because of overcrowding.
The north Dublin hospital - which is a national centre for brain surgery - last night said all the affected patients had been told of the cancellations.
The move is part of a series of measures by the hospital to try to ease the trolley crisis in its emergency department.
There were 40 patients on trolleys in the hospital yesterday morning, five of whom were moved to wards in a bid to free up space.
A spokeswoman for the hospital said it also had to divert ambulances to the Mater Hospital for an hour yesterday to relieve the pressures it was experiencing.
She said the hospital emergency department is one of the busiest in Ireland, providing services to over 50,000 patients each year.
"The hospital acknowledges and regrets the difficult conditions experienced by patients and staff at its emergency department, which have been exacerbated by several factors, including high numbers of attendances at the department and those needing a bed."
The hospital is asking patients considering coming to its emergency department today to contact their GP instead and, if possible, to avoid or delay their visit.
It is advising GPs not to send patients to Beaumont emergency department unless absolutely necessary.
Patients with minor injuries should visit the Mater Smithfield Rapid Injury Clinic .
Other measures to ease overcrowding include doctors doing extra medical rounds to prioritise discharges.
The hospital is trying to get additional step-down beds in the community.
It is working with the other hospitals in the RCSI hospital group to manage the situation, the spokeswoman said.
Nationally, the numbers on trolleys have fallen in recent days - but some of the Dublin city hospitals continue to be under huge pressure.
There were 32 patients on trolleys in St Vincent's Hospital yesterday as it coped with the overflow of patients who can no longer attend St Colmcille's in Loughlinstown, which was shut down.
Since the beginning of the year thousands of operations across the country have been cancelled to ease trolley congestion.
This has led to a rise in the numbers of public patients facing delays of more than 15 months on waiting lists.