An 11-year-old New Jersey girl died over the weekend after she was apparently electrocuted when she touched a metal boat lift in an Ocean County lagoon.

The girl was swimming and floating on an inflatable raft with two friends in the lagoon off Tobago Avenue in Toms River when she touched the metal boat lift's rail shortly after 8 p.m. Saturday, police said.

The child, who lived in Newark and was visiting friends in Toms River, was shocked by an electric current that was energizing the equipment, police said. She was wearing a lifejacket at the time.

Adults who were with the children began performing CPR, and emergency crews took over resuscitation efforts when they arrived minutes later, officials said.

The child, whose name was not released, was taken to Community Medical Center, where she later died.

The two other girls were not injured. The death remains under investigation.

Electric shocks while swimming are rare but serious hazards.

Last summer, three people in the Philadelphia region were hospitalized in a single weekend after suffering from shocks while in pools. Faulty lampposts, a light-switch electrical malfunction and a service line were believed to have contributed to those injuries.

Electric shock drowning can happen in any place where electricity is present near water, but is most common in public and private marinas and docks, according to the  Electric Shock Drowning Prevention Association, a nonprofit that works to raise awareness about the hazard.

In such cases, electricity enters the water from the wiring of the dock or marina, or boats connected to the power supply. The group advises against swimming near boats, docks or marinas that use electrical power. Boating Magazine advises that boat owners take steps to prevent electric shocks that include testing equipment and systems, and not swimming in marinas.