A process for the extraction of rare earth elements from a permanent magnet containing them in metal or alloy form, wherein the process comprises the steps of: a) contacting the starting product containing rare earth elements in metal or alloy form with a deep eutectic solvent that consists of a mixture of (i) a hydrogen bond acceptor compound selected from a) a salt of the formula Cat + X -, wherein Cat + is a cation selected from the group consisting of any ammonium, imidazolium, and phosphonium, and X - is a Lewis base; b) betaine or a salt thereof; c) carnitine or a salt thereof; and (ii) a hydrogen bond donor compound selected from (C 1 -C 12)alcohol, (C 1 -C 12)aldehyde, (C 1 -C 18)carboxylic acid, (C 1 -C 6)urea, (C 1 -C 12)amide, (C 1 -C 12)nitrogenated compound, (C 1 -C 12)aminoacid and (C 1 -C 12)sugar; in a molar ratio of to from 1:10 to 10:1, wherein the deep eutectic solvent is capable of extracting at least 50% w/w of one or more rare earth elements contained in the starting solid product in less than 5 hours when the step of contacting the starting product containing rare earth elements with the deep eutectic solvent is carried out at a temperature from 60-90 °C and in a weight ratio solid to liquid from 1:15 to 1:150; and b) separating the solvent containing the rare earth elements in dissolution from the undissolved solid. a) contacting the starting product containing rare earth elements in metal or alloy form with a deep eutectic solvent that consists of a mixture of (i) a hydrogen bond acceptor compound selected from a) a salt of the formula Cat + X -, wherein Cat + is a cation selected from the group consisting of any ammonium, imidazolium, and phosphonium, and X - is a Lewis base; b) betaine or a salt thereof; c) carnitine or a salt thereof; and (ii) a hydrogen bond donor compound selected from (C 1 -C 12)alcohol, (C 1 -C 12)aldehyde, (C 1 -C 18)carboxylic acid, (C 1 -C 6)urea, (C 1 -C 12)amide, (C 1 -C 12)nitrogenated compound, (C 1 -C 12)aminoacid and (C 1 -C 12)sugar; in a molar ratio of to from 1:10 to 10:1, wherein the deep eutectic solvent is capable of extracting at least 50% w/w of one or more rare earth elements contained in the starting solid product in less than 5 hours when the step of contacting the starting product containing rare earth elements with the deep eutectic solvent is carried out at a temperature from 60-90 °C and in a weight ratio solid to liquid from 1:15 to 1:150; and (i) a hydrogen bond acceptor compound selected from a) a salt of the formula Cat + X -, wherein Cat + is a cation selected from the group consisting of any ammonium, imidazolium, and phosphonium, and X - is a Lewis base; b) betaine or a salt thereof; c) carnitine or a salt thereof; and a) a salt of the formula Cat + X -, wherein Cat + is a cation selected from the group consisting of any ammonium, imidazolium, and phosphonium, and X - is a Lewis base; b) betaine or a salt thereof; c) carnitine or a salt thereof; and (ii) a hydrogen bond donor compound selected from (C 1 -C 12)alcohol, (C 1 -C 12)aldehyde, (C 1 -C 18)carboxylic acid, (C 1 -C 6)urea, (C 1 -C 12)amide, (C 1 -C 12)nitrogenated compound, (C 1 -C 12)aminoacid and (C 1 -C 12)sugar; b) separating the solvent containing the rare earth elements in dissolution from the undissolved solid.