Sudan has repealed the death penalty for people who engage in consensual sex with a person of the same sex.

The Sudanese Penal Code previously prescribed death or life imprisonment for people convicted of sodomy three times.

Gay sex remains a crime in Sudan and violators may face up to seven years in prison, the Washington Blade reported. Lashings have also been removed.

Sudan's Sovereignty Council approved the changes.

Noor Sultan, executive director of the Bedayaa Organization, which promotes LGBT rights in Sudan and Egypt, told the Blade: “It is a great step toward change and reflects the willingness of the government. The law is still there and the jail sentence is still there, but we are optimistic.”

The Sovereignty Council also approved other reforms to the Sudanese Penal Code, Maria Sjödin, executive director of OutRight Action International, said in a statement.

“The removal of the death penalty for same-sex intimacy in Sudan among other important reforms, such as the banning of female genital mutilation and stoning for apostasy, is an important step for the human rights of LGBTIQ people, and human rights in Sudan overall,” said Sjödin.