The Hungarian parliament on Tuesday approved a law that bans LGBT content in schools.

The bill prohibits the discussion of LGBT issues, including transgenderism and homosexuality, to minors. The measure was attached to a wider bill that increases the penalties for pedophilia, making it difficult for lawmakers to vote against it.

Protesters gathered outside parliament on Monday to protest the legislation. Several rights groups called for it to be withdrawn, CNN reported.

Prime Minister Viktor Orban of the ruling Fidesz party is seeking a fourth consecutive term next year. Under his tenure, Hungary has moved dramatically to the right. The Hungarian constitution was amended in 2010 to define marriage as a heterosexual union and recently the government banned gay and lesbian couples from legally adopting children.

Russia approved a similar law that prohibits “gay propaganda” in 2013. The law has been used to shut down LGBT marches and other related events.

International corporations that have operations in Hungary such as Google and ViacomCBS spoke out against the ban.