The Ipswich Hospital NHS Trust has agreed to spend about £3.6m on improving its electrical systems.
Ipswich Hospital needs new generators, says a report
A report said unless money is spent the hospital could be sued if a patient dies due to the electricity failing.
The report went before the Trust's board this week. The spending now needs to be agreed by the East of England Strategic Health Authority.
The Trust currently hires a mobile generator and faces loss of electrical power at peak times of day.
Steve Harrup, the Trust's director of estate and facilities, said in the report that the investment would buy the hospital a new generator, a generator back-up and mobile generators.
It would also see the replacement of old generator control panels and switches to allow the 800-bed hospital to have a secure supply of electricity over the next 20 years.
The report adds that if the electrical system at the hospital is not upgraded, the Trust would face the possibility of the electricity failing and could be sued if a patient is injured or dies due to this.
It says the Trust would not only have its reputation damaged but could face having to pay substantial damages.