The first to realize there was some connection was Danish physicist Hans Christian Ørsted. While setting up for a lecture he was to give at the university in 1820, Ørsted noticed that the electric current from the battery he was using deflected a nearby compass needle. He soon realized that moving electricity created a magnetic force, and coined the term “electromagnetism.”