A critical incident has been declared at a hospital in Hampshire.
Services across Queen Alexandra Hospital in Portsmouth are under "extreme pressure".
Staff sickness and the hot weather is causing a strain on services, the hospital says.
The trust has warned of "limited space" in the emergency department.
It says it is focusing on "safely discharging as many patients as possible", and asks patients to not attend the department unless it is in an emergency.
A spokesperson for the trust said: "Through the incident, we are focusing our actions to prioritise the provision of critical, emergency services.
"The safety of our patients and our staff remains our top priority.
Dr John Knighton, Medical Director at PHU, added: "We need the local community to help us by helping patients get home as soon as possible and only using the Emergency Department for life threatening conditions and injuries.
“Our immediate priority is to ensure there are beds available for our most seriously ill patients and we will be focusing on safely discharging as many patients as possible. We ask that families and loved ones support us with this and collect patients as soon as they are ready to be discharged.
“We also urge you to not attend the ED unless it’s an emergency. Non-emergency attendances will not be seen and you will be redirected to the Urgent Treatment Centres at St Mary’s Hospital, Gosport and Petersfield.
"We have limited space and we are only able to treat patients with life threatening conditions and injuries.”
The trust says it will be reviewing the situation regularly.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here