Although the human understanding of electricity is relatively recent, we already knew of the existence of this rare and almost magical energy for several millennia. There are Egyptian records of nearly 5 thousand years old that speak of electric fish in the Nile river, and since then many other civilizations also described other similar marine animals.
It was the Greeks who gave the first tumbles with static electricity and electromagnetism, although as in most of their observations, the basis of their postulates was not misguided, many things were not entirely accurate.
There are those who believe that there are ancient civilizations that understood electricity much better than we think, is the case of births, which created pieces that could function as original batteries. In any case, it has not been proved that such objects were designed to be used as batteries, nor have other objects of that time that need electrical power been found, so this is a very controversial issue
Interestingly, discovering that electrical energy forms the rays seems to have taken us much longer. The first records that are held about it are of Arab civilizations of the fifteenth century, who used the word ray (raad) to refer to the phenomenon.