Australia will ban schools from expelling gay students after a leaked report revealed the practice was enforced at some religious schools, according to Agence France-Presse.

The report, commissioned to pacify the ruling coalition’s conservative wing, focused on laws that allow private and faith-based schools in some states to discriminate against homosexual students. While the report favored writing the practice into federal law, the public revelation of such a policy sparked public fury.

Catholic organizations joined the outcry, and rejected the idea that the government should legalize discrimination based on sexuality, according to AFP.

Prime Minister Scott Morrison, an evangelical Christian who opposed gay marriage, initially tried to quell the debate by insisting the review had been “misreported.” On Saturday, as the issued continued to gain traction, Morrison promised he would introduce legislation against sexuality-based discrimination to prevent “confusion and anxiety for parents and students.”

“I will be taking action to ensure amendments are introduced as soon as practicable to make it clear that no student of a non-state school should be expelled on the basis of their sexuality,” he said.

Labor Party leader Bill Shorten also said he has offered to help Morrison remove laws allowing “discrimination against children because of who they are.”

The debate around the expulsions comes ahead of an Oct. 20 by-election that could cost the conservative government its tenuous parliamentary majority.

Last year, Australia voted overwhelmingly to legalize same-sex marriage, after years of conservative resistance.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Laignee Barron at Laignee.Barron@time.com.