A 10-year-old girl has been saved from drowning by a computer system designed to raise the alarm when swimmers get into difficulties.
The girl, from Rochdale, was at the deep end of the pool in Bangor, north Wales, when she sank to the bottom.
The £65,000 system, called Poseidon, detected her on the pool floor and sounded the alarm. A lifeguard pulled her out and she recovered in hospital.
It is thought to be the first such rescue in the UK.
The girl had just entered the water and she had swum only a few strokes before appearing to black out.
One of the safety system's four underwater cameras showed her sinking without any sign of a struggle into the 12ft 6in deep end.
Once she had lain motionless on the pool floor for three seconds, the computer sounded an alarm which also pinpointed which part of the pool the girl was in to the five lifeguards on duty.
The cameras trigger an alert for the lifeguards to respond to
Lifeguard Karen Gibson, who carried out last week's rescue, said the first thing she had heard was the alarm going off.
"You can't see people on the bottom when there are people swimming, let alone on the summer holidays when there is so much splashing and activities because it is so deep," she said, before praising the system.
"It is amazing, fantastic, it really does help us do our job."
Gwynedd County Council leisure officer Brian Evans said: "We feel as though the system has saved this little girl's life.
"The pool at the time was very busy. The lifeguards were at full stretch. We can say the extra pair of eyes identified her."
He said the computer identified the girl as being in distress within 10 seconds of her slipping under the water. From beginning to end, the alert took just one minute and 27 seconds.
"The lifeguards would have seen her but perhaps not within 10 seconds. That's the critical thing. A lifeguard could have taken a minute, maybe two, maybe three minutes. We can't say."
Lifeguard Karen Gibson carried out the rescue
The girl was pulled unconscious from the water and given life-saving treatment at the poolside. She spent the night in hospital after the incident last Wednesday but made a full recovery.
The Poseidon system was installed two years ago because the local authority considered Bangor to be the most difficult of its eight pools to lifeguard.
Mr Evans said: "The Bangor pool is a typical 1960s pool, with a lot of windows that create a glare. The deep end is 12ft 6in, that's unusual these days, because of the diving area.
"We had considered reducing the depth and doing away with the diving board but we realised this system was available.
"This is the first time we've had to use it in the two years it has been installed. Everything worked according to plan."
The Poseidon system, which uses a matrix of underwater and overhead cameras, is installed at eight swimming pools in the UK.
François Marmion, general manager of Vision IQ, the company which developed Poseidon, said: "It is virtually impossible for lifeguards to see everything that is happening in the pool all of the time, given the warm, noisy and crowded environment in which they typically work."