After two days of debate, the Florida Senate on Tuesday gave final approval to a controversial bill dubbed “Don't Say Gay.”

Governor Ron DeSantis, a Republican, is expected to sign the bill into law.

House Bill 1557 cleared the Senate with a 22-17 vote largely along party lines.

The measure prohibits schools for children in kindergarten through grade 3 from engaging in “instruction” about sexual orientation and gender identity. It also restricts the topic throughout the education system and allows parents to sue school districts.

In a statement released Tuesday, Education Secretary Miguel Cardona suggested that the bill may violate federal civil rights law.

“The Department of Education has made clear that all schools receiving federal funding must follow federal civil rights law, including Title IX’s protections against discrimination based on sexual orientation and gender identity,” Cardona said. “We stand with our LGBTQ+ students in Florida and across the country, and urge Florida leaders to make sure all their students are protected and supported.”

(Related: Biden condemns Florida's “Don't Say Gay” bill; Calls it “hateful.”)

Equality Florida, the state's largest LGBTQ rights advocate, said it stood ready to challenge the legislation in court.

“Let us be clear: should the vague language of this bill be interpreted in any way that causes harm to a single child, teacher, or family, we will lead legal action against the State of Florida to challenge this bigoted legislation,” the group tweeted.