Florida senators passed a Republican-backed bill on Tuesday that would restrict many young kids from discussing their sexual orientation and gender identity in the classroom, despite criticism and student protests that the proposal was discriminatory and foolish.

The law, dubbed as "don't mention gay" bill by opponents, has sparked national debate amid an increasingly contentious fight over what children should learn about race and gender in schools.

Governor Ron DeSantis, who is running for re-election this year, has expressed support for the law known as "Parental Rights in Education." He and other Republican leaders throughout the country say they want parents to have greater input over what their children learn in school.

Such policies, according to Democrats, will hurt the lesbian, gay, bisexual, transgender, and queer communities. The Florida law prohibits public schools from teaching on sexual orientation or gender identity to children in kindergarten through third grade, or ages 5 to 9.

It also prohibits such teaching for pupils in other grades that is "not age appropriate or developmentally suitable." Parents would be able to sue school districts if they felt they are in breach of the law.

On Monday, DeSantis told reporters, "We're going to make sure that parents can send their kids to kindergarten without some of this material being pumped into their school curriculum."

To protest the bill, high school students across Florida held walkouts. On Monday, video footage showed students swarming the state capitol's stairs and halls, holding pro-LGBTQ placards and screaming "We say gay!"

The bill was primarily carried along party lines in the state Senate on Tuesday. Last month, the plan was also approved by the state House of Representatives, which is controlled by Republicans.

Democrat Shevrin Jones, the first open homosexual Florida state senator, chastised his Republican colleagues for pushing for the law for political advantage during a floor debate before the state Senate vote on Tuesday.

Republicans who backed the bill claimed it was designed to keep young pupils from having inappropriate discussions about sex and gender identity.

Republican state Senator Danny Burgess remarked, "There is an effort to introduce these types of debates into younger and younger age groups. As a state, our default stance must be and should remain: trust the child's parents." 

The education law is the latest Florida measure to face widespread opposition.