Ambulance crews and police vehicles had to queue for hours to hand over patients at a hospital as staff scrambled to find room for them in cupboards and clinic waiting rooms.
One crew waited 16 hours with a patient at Ayr Hospital and a police van waited for six hours with a patient they had picked up because there were no ambulances.
The hospital had a deluge of patients arriving at A&E last Tuesday night and struggled to cope.