A process for obtaining an alkaline earth or rare earth metal -P-modified molecular sieve (M-P-modified molecular sieve), wherein the molecular sieve is a MFI, wherein the M-P-modified molecular sieve comprises at least 0.3 wt% of P and at least 0.05 wt% of the alkaline earth or rare earth metal M, and wherein the final molar ratio M/P in the M-P-modified molecular sieve is lower than 1, the process comprising the following steps: a). modifying the molecular sieve with P prior to step b) by introducing at least 0.3 wt % of P and performing the following steps in the order provided: i) steaming at a temperature ranging from 400 to 870°C for 0.01-200 hours ii) leaching with an aqueous acid solution containing the source of P in solubilized form at conditions effective to remove a substantial part of Al from the molecular sieve i.e. at least 10% of Al have been extracted and removed from the molecular sieve by leaching and to introduce at least 0.3 wt % of P; b). contacting the P-modified molecular sieve obtained in a) with an alkaline earth or rare earth metal-containing compound (M-containing compound) in solution form to introduce at least 0.05 wt% of the alkaline earth or rare earth metal M to the molecular sieve and wherein said solution has a concentration of at least 0.05 M of said M-containing compound, and wherein the modified molecular sieve obtained in b) is further modified according to the following steps: iii) separation of the solid from the liquid iv) an optional washing step or an optional drying step or an optional washing step followed by a drying step v) a calcination step a). modifying the molecular sieve with P prior to step b) by introducing at least 0.3 wt % of P and performing the following steps in the order provided: i) steaming at a temperature ranging from 400 to 870°C for 0.01-200 hours ii) leaching with an aqueous acid solution containing the source of P in solubilized form at conditions effective to remove a substantial part of Al from the molecular sieve i.e. at least 10% of Al have been extracted and removed from the molecular sieve by leaching and to introduce at least 0.3 wt % of P; i) steaming at a temperature ranging from 400 to 870°C for 0.01-200 hours ii) leaching with an aqueous acid solution containing the source of P in solubilized form at conditions effective to remove a substantial part of Al from the molecular sieve i.e. at least 10% of Al have been extracted and removed from the molecular sieve by leaching and to introduce at least 0.3 wt % of P; b). contacting the P-modified molecular sieve obtained in a) with an alkaline earth or rare earth metal-containing compound (M-containing compound) in solution form to introduce at least 0.05 wt% of the alkaline earth or rare earth metal M to the molecular sieve and wherein said solution has a concentration of at least 0.05 M of said M-containing compound, and wherein the modified molecular sieve obtained in b) is further modified according to the following steps: iii) separation of the solid from the liquid iv) an optional washing step or an optional drying step or an optional washing step followed by a drying step v) a calcination step iii) separation of the solid from the liquid iv) an optional washing step or an optional drying step or an optional washing step followed by a drying step v) a calcination step