FLATBUSH - Police are investigating the death of a Brooklyn teen who may have been electrocuted while climbing a school fence.

According to authorities, 17-year-old Luis Rivera was playing basketball with friends in front of P.S. 27 in Flatbush Wednesday. Rivera?s friends say the fence was locked, so they climbed over it. According to Rivera?s friends, they heard a loud buzz, saw a blue flash and then saw his body hanging from the fence.

Investigators believe Rivera may have hit his head against a light fixture near the fence. The medical examiner still must determine the exact cause of death. Meanwhile, the Department of Education says it has found no defects in the playground?s electrical box and the property is safe.