Mahram

In Islam, a mahram (Arabic: محرم) is a family member with whom marriage would be considered permanently unlawful (haram).

For a man, mahram women include his mother, grandmother, daughter, granddaughter, sister, aunt, grandaunt, niece, grandniece, his father's wife, his wife's daughter (step-daughter), his daughter-in-law (if previously married to his biological son.

˹Also˺ forbidden to you for marriage are your mothers, your daughters, your sisters, your paternal and maternal aunts, your brother’s daughters, your sister’s daughters, your foster-mothers, your foster-sisters, your mothers-in-law, your stepdaughters under your guardianship if you have consummated marriage with their mothers—but if you have not, then you can marry them—nor the wives of your own sons, nor two sisters together at the same time—except what was done previously.

Surely Allah is All-Forgiving, Most Merciful.All of the man's female relatives mentioned in these two verses are considered his maharim, because it is unlawful (haram) for him to marry them, except the wife's sister, whom he can marry if he divorces her sister, or if his wife dies.

That means, for example, that a man will remain mahram to his ex-mother-in-law after divorcing her daughter.