In 1820, Hans Christian Oersted gave a demonstration on electricity to a class of advanced students at the University of Copenhagen in Denmark. Using an early battery prototype, he looked to see what effect an electric current would have on a compass, and since he hadn’t had time to test his experiment beforehand, the outcome was just as unknown to him as it was to his students. When he completed the circuit by attaching a single wire to both ends of the battery, the resulting current caused the needle of the compass to line up with the wire, showing that electricity and magnetism were two facets of the same phenomenon.
Click here for original story, The power of attraction: Magnets in particle accelerators
Source: Phys.org