As Americans turn to lakes and coastal shores to cool off this summer, officials warn of a potential danger that most swimmers and recreationists probably wouldn’t think of: electrocution.

Incidents involving metal docks, ladders and piers discharging dangerous or potentially deadly electrical currents happen each year. While exact numbers weren’t available, these injuries and deaths are usually attributed to problems with dock and pier electrical grounding systems or even electrical leakage by nearby boats, experts say.

A 21-year-old Illinois man recently died while climbing out of the water onto a dock ladder at a cove in Lake of the Ozarks, Missouri, State Police Corporal Scott White told SafeBee. The swimmer touched the metal ladder and received a fatal jolt. Two children died at the same lake three years ago under similar circumstances, White says.

"The incidents that grab headlines are when someone is killed, but we do have situations when someone finds there's a problem, reports it and the problem is remedied before someone gets seriously hurt," he said. "I wouldn't say it's a common problem, but it's not extremely unusual either."

Related: A Day at the Lake? Avoid an Ocean of Trouble

Keeping it grounded

Electrical consultant Ed Clark has investigated hundreds of electrical accidents and served as an expert witness on cases around the country, including some dock-related electrocutions. He says the cause of these cases almost always involves an electrical grounding issue with the dock, and sometimes other hazards.

Docks, including ladders and any other fastened metal structures on them, should be properly grounded by a qualified electrician, Clark says. Outlets and panels should be equipped with Ground Fault Interrupters (GFIs), which activate a safety breaker to shut off power when it senses a problem with the current.

GFIs, while important, aren’t enough on its own, says Clark. Sometimes people can receive mild shocks, even with a GFI system, if the current is not strong enough to cause the safety device to kick in. That’s why making sure your system is properly grounded is a critical first step.

After you install your system, it doesn’t hurt to get your municipal electrical inspector to double check the work, he says.

Boats and other dangers

Sometimes even with properly grounded equipment and GFI, accidents can still happen, adds Michael S. Morse, PhD, an electrical accident reconstruction expert in San Diego, California.

Morse has investigated cases in which boats have electrical problems that energize the water with electricity. In the worst cases, a person can be electrocuted while swimming too close to the source of electricity. In other instances, the swimmer may feel some tingling when there’s a mild electric current flowing. The tingling can turn into a deadly shock if the swimmer attempts to leave the water by climbing onto a metal ladder or dock, especially if the electricity’s path is in a direct line between him and the boat.

The key is to recognize that even a tingling or minor electrical sensation while swimming is dangerous. If you feel one, avoid contact with metal so the electricity doesn’t use your body as a conductor, says Morse.

Related: Kayaking Safety: How Not to Find Yourself Up the Proverbial Creek

Code tightening is coming

Grounding and GFIs will help, but more needs to be done to tighten the National Electrical Code, says Morse. “I think everything in a marina should be adequately ground fault protected,” Morse said. “The national electric code does not yet require that.”

The National Fire Protection Association (NFPA), which revises the National Electric Code, is working on just that, said Mark Cloutier, an NFPA senior electrical engineer.

Related: Lightning Safety: What to Do During a Storm

Ronald Agrella is a freelance writer and former editor of The Boston Globe’s Boston.com.