A method for the continuous or discontinuous extraction of a metal or several metals from a slag that contains the metal or a compound of the metal, in which the liquefied metal-containing slag is heated in a primary or secondary smelting unit (1) designed as an alternating-current electric furnace, and molten material is then fed from the primary or secondary smelting unit (1) into a furnace (2) designed as a direct-current electric furnace, in which the metal to be extracted is subjected to an electrolytic separation, where a reducing agent in the form of calcium silicide (CaSi), calcium carbide (CaC2), ferrosilicon (FeSi), aluminum (Al), and/or reducing gases is added and/or injected into the primary or secondary smelting unit (1) wherein, in the second furnace (2), which is designed as a direct-current electric furnace, the molten bath is electromagnetically stirred during the recovery of the metal.