MARSHALL, Minn. — Mary Kay Thomas loved being a middle school principal here for 15 years, but on a recent summer morning, she sat in her backyard, sad and alone.

Instead of the usual excitement of classes starting, she's apprehensive about another year at the district where she became the center of controversy.

It has been more than two years since the 58-year-old grandmother hung a rainbow flag in the school cafeteria, enraging some people in this southwestern Minnesota community.

She was jettisoned into an administrative job — away from students — that she never wanted, and now feels like a black sheep. The backyard swing set is quiet because her daughter and son-in-law, who used to work in the district, moved with their five children to the Twin Cities suburbs, distraught about the controversy.

Hanging that flag disrupted Thomas's career, family and sense of community.

But in the aftermath, a surprising thing happened: Lesbian, gay, bisexual and transgender people and their allies, who used to feel isolated in this farming hub, found each other.

The high school's SPECTRUM Club, a gay-straight alliance which had formed a few years before, saw a spike in membership. A similar club formed in the middle school. Students organized an after-school march to support LGBTQ classmates and community members. The town had its first large gay pride festival this summer, and Brau Brothers Brewing Co. hosted a drag show that packed in some 300 people. The local college hosted "Queer Prom."

"They say don't poke a sleeping bear. Well, a bear's been poked," said Anne Veldhuisen, a progressive pastor at Christ United Presbyterian Church in Marshall. "People were already sick and tired of the way they were being treated for who they are, and all the sudden it became a very public, citywide thing. And supporters came out of the woodwork."

Thomas has since sued the district, alleging the rainbow flag led to her reassignment and asking for damages and her old job back. In its response in federal court, the district said claims that Thomas had created a "divisive work environment" had nothing to do with the rainbow flag.

Thomas hopes the lawsuit encourages changes in training staff and disciplining discrimination.

"There's a lot of things we want to change in the community, but primarily in the schools, the recognition of our kids and who they are," Thomas said. "That they have equity and a right to advocacy. That's what the foundation of this whole case is about."

Marshall sits amidst prairie and farmland halfway between the Twin Cities and Sioux Falls, an agricultural center that's also home to Schwan's Co. and Southwest Minnesota State University. It's a community that values education, with voters regularly and overwhelmingly approving funding for new schools and facilities.

It's also one of the more reliably Republican parts of the state. Lyon County voted for Donald Trump by nearly a two-to-one margin over Joe Biden in 2020. (The county has voted for a Democratic presidential candidate once since 1976.)

In January 2020, Thomas hung the pride flag in a display of 30 or so flags of marginalized communities, mostly those of the countries of origin for English-language learner students but also tribal flags and an autism flag. While the majority of those who spoke at school board meetings took Thomas' side, several pastors spoke against the flag, as did some community members. One pastor called it a "lifestyle flag" and said the school needed to show neutrality about a "contested issue." In her lawsuit, Thomas asserts that being gay is not a choice, and that phrases like "gay lifestyle" are slurs against the LGBTQ community.

Thomas filed discrimination charges with the state Human Rights Department and federal Equal Employment Opportunity Commission. A group of Marshall-area residents sued Thomas and the district, claiming a student's First Amendment rights had been violated when a petition to remove the rainbow flag was confiscated.

Thomas said she knows her assertive style and advocacy can rub people the wrong way; some in town say they support what the flag stands for but wish Thomas had gone about it differently. But Thomas believes helping marginalized students is vital in a district now more than 40% nonwhite.

After the flag controversy, she was put on a performance improvement plan for the first time in her career. Last year, the district removed her as principal and made her district assessment coordinator, where she oversees testing, writes grants, helps with hiring — but doesn't work with students.

Superintendent Jeremy Williams declined a Star Tribune request for comment, citing ongoing litigation, and two of the city's more prominent conservative pastors did not return messages.

Ellen Helgerson, who'd been a Spanish teacher at Marshall Middle School before leaving a year ago, helped students launch a middle school gay-straight alliance as the flag divided the town. Helgerson printed flashcard-sized rainbow signs reading "ALL ARE WELCOME HERE" and brought them to a teachers' meeting. But administrators later told her they couldn't be distributed because some teachers were uncomfortable.

"What it means is for those kids to feel safe," said Helgerson, who cited the flag controversy as a reason she left the district. "That was just a flag to show this simple gesture: 'You're welcome here.' And this caused so much turmoil."

While teachers noticed gay students and allies become more outspoken, some students tore down the club's posters and tallied how many they damaged. The high school's gay-straight alliance organized a Day of Silence, where students took a one-day vow of silence to raise awareness about bullying of LGBTQ students.

Karrie Alberts — Thomas' daughter, a former Spanish teacher at Marshall High School and at the time the adviser to the Spectrum Club — was called to the principal's office and told teachers and parents complained that the Day of Silence pitted students against each other.

"It's like a microcosm of America right now. People got angry, so they went to their own sides," Alberts said. "No one comes together to find common ground. It's just us against them."

The district's response in the lawsuit points out that although Thomas' original flag display was taken down, a rainbow flag remains in a display case for the middle school gay-straight alliance.

The controversy continues to deepen the resolve of some students, said Elly Lewis, a sophomore who is an active member of Spectrum Club. Lewis said the flag controversy left students feeling they had to pick a side.

"Even now, a lot of people still bring up the flag," Elly said. "I heard somebody say, 'Well, where was the straight flag when the pride flag was up? What if I want to celebrate my straightness?' "

"But we don't want to fight," she continued. "They think they're tearing us down, but they're really building us up. Every mean comment, every horn honk, every anti-gay post, we just use that to build our staircase up."