Oersted observed while performing the experiment when he passed a current through a wire which caused a nearby magnetic compass needle to move.When current switched off then needle comes to their original position
In the experiment of Oersted's he passed electric current through a wire,which caused a nearby magnetic field so that compass needle move.That shows that magnetic effect of eclectic current.