Benjamin Franklin attached a metal key to the end of his kite string to prove that lightning is electricity. During a thunderstorm, he flew the kite and observed electrical sparks jumping from the key to his hand, proving that lightning was a form of electrical energy. This experiment helped to establish the basis of electrical theory and led to the invention of lightning rods for protecting buildings from lightning strikes.