At three minutes past eight on a chilly Tuesday morning in January 1803, George Foster staggered up the stairs to the gallows outside the Old Bailey courthouse in London. The week before he had denied the charges set against him. The judge rejected his plea. Foster was convicted of drowning his wife and daughter, whose waterlogged bodies had been found in early December, in the Paddington Canal. He had refused food and, enfeebled by hunger, had to be helped into the noose. A prayer was said. A cap was pulled over his eyes. Some of his friends stood beneath the gallows, ready to tug on his legs when they dropped, in order to hasten death and limit suffering. The stage fell and Foster was, in the words of The Newgate Calendar, “launched into eternity.”

Eternity was not, however, the end for him. Foster’s body was immediately cut down and carted to a nearby house, where Giovanni Aldini , a 40-year-old Italian physicist, sat waiting—in anticipation of an experiment that he hoped would disprove, in a way, the existence of batteries. In the house, among a small yet influential audience and with a certain amount of dramatic flourish, Aldini inserted one metal rod into Foster’s lifeless mouth and another into his ear. Reports of what happened next would inspire Mary Shelley , who was only 5 years old at the time, to later write Frankenstein, the novel in which a grimly inventive doctor fashions a creature from discarded human body parts.

At first, Foster’s jaws began to quiver. Then the adjoining muscles contorted, opening one of the dead man’s eyes. As electrical current continued to flow through his muscles, Foster’s right hand clenched into a fist, and his legs and thighs began to shake. Some of the bystanders recoiled, believing that he was in the process of being resurrected. Mr. Pass, the beadle of the Royal College of Surgeons (who had allegedly hurried Foster’s trial through in order to produce a fresh body for the experiment), was so alarmed by what he saw that later in the afternoon he died of shock.

While Aldini’s experiment might appear as though it was staged to alarm or entertain, it was, in fact, the latest ploy in a long-running vendetta between two camps of scientists. Aldini’s uncle was the surgeon Luigi Galvani who, two decades earlier, had been watching his assistant dissect a frog when the steel scalpel touched a brass hook holding its leg in place. The leg twitched inexplicably. This set off a chain of experiments, in which Galvani jabbed frogs with different combinations of metal objects to observe the effects. He believed the muscle spasms were caused by “animal energy,” which resided in the muscles themselves, and published his findings in 1791. The reaction, which Galvani’s nephew showed on Foster’s body to such great effect, became known as “galvanising”—and Galvani was hence forth identified as the “frog-dancing master.”

Italian physicist Alessandro Volta didn’t buy it, however. Volta, one of the world’s leading experts in electricity (from whom the volt takes its name), replicated Galvani’s experiments and reached a different conclusion. He believed the frog’s corpse did not contain latent energy, but rather that the chemical-rich carcass was merely acting as a conductor for electricity running between two metals. To disprove the existence of “animal electricity,” in 1799 Volta replaced the frog’s leg with brine-soaked paper, inserting it between a stack of discs of two different metals. This “voltaic pile,” as he named the device, was the progenitor of the modern battery. (Benjamin Franklin had already coined the word itself to refer to a series of Leyden jars, which are able to hold and store a small amount of electrical charge but bear little resemblance to today’s batteries.)

It would be years, however, before the feud between the two camps resolved. At one point, Volta wrote to a friend that his opponents wanted him dead. Even Napoleon Bonaparte got involved, taking part in an experiment with Volta in which he drew sparks from a battery during a series of lectures at the French National Institute in 1800. Galvini’s nephew, Aldini, remained unconvinced, continuing to believe in his uncle’s beloved “animal energy” even after 1802 when the Scottish chemist, William Cruickshank, designed the first electric battery suitable for mass production.