Equality Utah has settled the first-of-its-kind lawsuit brought against the state of Utah a over sex-education law that banned positive discussions of homosexuality in public schools.

A joint motion to dismiss the lawsuit was filed Thursday in Salt Lake City’s U.S. District Court. Judge Dee Benson is expected to grant the dismissal.

“It’s remarkable what has happened,” Equality Utah Executive Director Troy Williams said. “The Utah State Board of Education has made it clear that LGBTQ students must not be discriminated against.”

The settlement filing follows a Sept. 18 letter sent by the Utah State Board of Education to all public and charter schools that noted recent changes to state sex-education laws and the board’s subsequent revised policies.

In its letter, the board said it “desires each student in Utah public schools to receive a high quality education free from all manner of discrimination, which can take the form of bullying, based on religion, race, ethnicity, gender, sexual orientation, and gender identity.”

To the extent that some old policies remain in place, schools must revise those now “invalid” rules so that they align with current law, the board said.

The settlement terms also includes a requirement that state schools develop and implement a safety plan for LGBTQ students targeted by harassment.

Equality Utah sued Utah, the state school board and three school districts — Cache County, Jordan and Weber — a year ago, asking a federal judge to strike down the so-called “no promo homo” laws as unconstitutional because they promote discrimination against LGBTQ students and others.

“The anti-gay school laws were enacted to express moral disapproval of homosexuality and of LGBT persons,” the complaint filed on Oct. 24, 2016, states. “They do not serve any state interests.”

The lawsuit was filed on behalf of three students: A 7-year-old gender-nonconforming boy who wears girl’s clothes to school; a lesbian teen who said she had been disciplined for holding hands with another girl; and a gay teen boy who had been subjected to years of bullying with gay slurs and was prohibited from speaking about his uncle’s same-sex marriage at school.

Utah lawmakers moved to avoid battling Equality Utah in court earlier this year by passing SB196, which removed language prohibiting the discussion of homosexuality from state laws.

Sponsored by Sen. Stuart Adams, R-Layton, SB196 takes no position on homosexuality, but instead stresses “the importance of abstinence from all sexual activity before marriage and fidelity after marriage.”

The Legislature’s action led to negotiations between lawyers for Equality Utah and the state education office on the changes to administrative rules and policies for schools.

In an email, Chris Stoll, a senior staff attorney at the National Center for Lesbian Rights, which filed the lawsuit for Equality Utah, expressed gratitude for the actions of the Legislature and the state school board.

“This settlement is a tremendous step forward for LGBT students in Utah,” Stoll said, adding that the changes make it clear “that gay and transgender students are as worthy as any other student of respect and inclusion at school.”

At least seven other states have similar “don’t say gay” laws on the books.

LGBTQ advocates say such laws unfairly label homosexuality as wrong and leave LGBT students at risk of harassment and discrimination.