A group of parents who fought to keep transgender students out of locker rooms and bathrooms that match their gender identity abruptly dropped their lawsuit against a Chicago-area school district, ending a four-year legal battle that drew national attention.

Students and Parents for Privacy sued Township High School District 211 in Palatine, Ill., after the school board, facing pressure from the Obama administration, voted to allow a transgender girl to use the girls’ locker room. The case drew national attention as schools throughout the country grappled with accommodating transgender people in bathrooms and locker rooms, a debate that played out in statehouses, courthouses and local school boards.

On its Facebook page, Students and Parents for Privacy, which was represented by the conservative legal group Alliance Defending Freedom, assured its members that the fight was not over but did not explain why it had dropped the lawsuit. A federal judge in Chicago approved the dismissal of the lawsuit Monday.

“We have voluntarily withdrawn our lawsuit against the school district,” the post from Students and Parents for Privacy read. “This does not in any way mean we are giving up. We will never give up. Every single child has a right to privacy and dignity in intimate spaces and schools have a duty to protect the well-being of every student.”

Ria Tabacco Mar, senior staff attorney at the American Civil Liberties Union, said the group’s decision to drop the lawsuit will allow the school system to move forward.

“It ends three years of uncertainty over whether the policy would be allowed to stand,” Tabacco Mar said.

In 2015, the Illinois school system — which has nearly 12,000 students in its five high schools and two alternative high schools, according to its website — denied a transgender girl’s request to use the girls’ locker room. She filed a complaint with the Education Department’s Office for Civil Rights. After an investigation, the department ruled the school system had violated Title IX, the federal law that bars sex discrimination in schools receiving government funding, by shutting the transgender student out of the locker room.

Despite protests from some parents, the school board voted to allow the student to use the girls’ locker room rather than risk losing $6 million in federal funding for violating civil rights law.

The case sparked an explosive debate over whether the Obama administration had exceeded its authority by pressuring the school system and whether Title IX, the same law that ensures girls have equal access to athletics, applied to transgender students in this context. Those students and their advocates applauded the Obama administration’s action, saying it validated their need to be treated like every other student. Conservative parents said such policies violated privacy and traditional values.

In 2016, Students and Parents for Privacy sued three transgender students, Township High School District 211 and the Obama administration with legal backing from the Alliance Defending Freedom, which is battling inclusive transgender policies in other schools. The ACLU intervened to represent the students.

Nova Maday, a 19-year-old transgender woman who graduated from Palatine High in 2018, said being barred from the girls’ locker room was embarrassing — and created other difficulties. Since her gym class was conducted in different facilities on the sprawling high school campus and the teacher would write a note in the locker room telling students where to meet, she sometimes had to wander the school to find her classmates. Because the school system dealt with every transgender student on a case-by-case basis, it also meant she had to discuss with administrators where to use the bathroom.

She balked at the notion that she was violating other students’s privacy.

“Why should I have to tell everyone: ‘Hi, I’m trans!’ ” said Maday, who sued the school system in state court for barring her from the locker room. She is not involved in the federal lawsuit. “If anything,” she said, “it’s a violation of my privacy.”

Students and Parents for Privacy had also said it hoped to elect school board members sympathetic to its cause in 2017, spending thousands of dollars in a school board race that is normally a low-budget campaign. The group’s fight attracted money from a big donor to the Republican Party. Their election efforts proved unsuccessful.

But since 2016, as the lawsuit wound through federal court, circumstances changed. The three transgender students graduated high school. President Trump was elected, and his education secretary, Betsy DeVos, and attorney general at the time, Jeff Sessions, rolled back the Obama-era directive.

The Alliance Defending Freedom continues to represent students and parents in other school systems in which they contend their privacy is being violated when they are forced to use bathrooms and locker rooms alongside transgender classmates.

Christiana Holcomb, the Alliance Defending Freedom attorney who represented the parent group in Illinois, said in a statement that her organization is “advocating for the privacy, safety, and dignity of all students across the country.”