The close connection between electric current and magnetic fields was discovered quite by accident. In 1820, Danish physicist Hans Christian Oersted (1777-1851) gave a lecture on the heating effects of an electric current on a wire. A compass happened to be near the wire and he was surprised to see the compass rotate when the current was on. He had been looking for connections between electricity and magnetism for several years, but expected that the compass would point away from the wire. Instead he found that the compass pointed in a circle around the wire. Above the wire it pointed perpendicular to the wire; below the wire it also pointed in the perpendicular, but in the opposite direction.