The deviation of a compass needle caused by an electric current, observed by Oersted in 1820, is known to be one of the first experimental links between electricity and magnetism.
Notice that this phenomenon was used for a long period to build DC ammeters because the needle’s deviation is proportional to the DC current. It is also the basis for the functioning of all electromagnets.