An 11-year-old girl slipped on a rope bridge leaving her hanging for several minutes by a safety lanyard looped around her neck, a court has heard.
The girl immediately fell unconscious following the accident at the YMCA Fairthorne Manor activity centre near Botley, Hampshire, in July 2012.
She was cut free and later recovered, Portsmouth Crown Court was told.
The YMCA Fairthorne Group denies two health and safety charges brought by Winchester City Council.
Prosecutor Malcolm Gibney said the lanyard - part of the safety equipment on the "Burma Bridge" - "was in effect in strangulation mode."
He said the rescue was "pretty shambolic" and it was "a matter of luck more than judgement she wasn't seriously hurt."
The jury heard the centre's operating procedures made it virtually impossible to rescue someone who became unconscious or incapacitated on the bridge.
Mr Gibney said instructor-to-child ratios were not followed and a knife in the rescue kit was not sharp enough to cut the ropes.
In the end a cable was severed and the girl dropped into the water under the bridge, along with one of two instructors trying to support her.
She was taken to hospital by air ambulance and later made a full recovery.
The girl, who cannot be identified for legal reasons, was among a group of 40 pupils from a school in Chandler's Ford who were on a trip to celebrate the end of the school year.
The trial continues.