Bills have been introduced in 15 states nationwide this year that aim to restrict transgender people’s access to sex-segregated facilities. From Minnesota to New York, many of the legislative bills awaiting votes focus specifically on schools as kids and teens find themselves at the center of a battle over bathrooms.

But many of the so-called “bathroom bills” filed across multiple states closely resemble each other. That’s because many used language strongly similar to the model legislation called the Student Physical Privacy Act drafted by Alliance Defending Freedom (ADF), a powerful conservative Christian law firm with a decades-long track record of litigating against LGBT rights. It’s also been labeled a “hate group” by the Southern Poverty Law Center.

Related: ACLU Sues City Over Nuisance Policy, Alleges It Punishes Domestic Violence Victims

The firm’s model legislation is mirrored in — sometimes identical to — proposed state bills around the country. Minnesota’s 2017 Student Physical Privacy Act is a word-for-word copy of the ADF legislation. A 2016 Kansas bill to create a student privacy act was an ADF twin as well. While the Kansas bill died after public outcry over a provision allowing students to sue their schools every time they encountered a trans classmate in a restroom, the Minnesota bill is currently awaiting a hearing. NBC News examined a handful of similar bills in Texas, Illinois, Kentucky, South Dakota, and Nevada that all appeared to be influenced by the model legislation. Dozens of such bills were proposed in early 2017.

Republican state Sen. Lois Kolkhorst, author of Senate Bill 6 which prohibits transgender-friendly bathrooms, holds a notebook of stories from people during her research on the legislation, as she presents the bill on the floor of the senate for debate at the state capitol in Austin, Texas, on March 14. Ralph Barrera / Austin American-Statesman via AP

In February 2016, the Washington Post quoted ADF attorney Matt Sharp saying that “lawmakers in at least five states” had used the model legislation. Sharp also told the Post that ADF had mailed its Student Physical Privacy Act to “thousands” of school districts.

Mara Keisling, director of the National Center for Transgender Equality, travels the country testifying at legislative hearings and meeting with local advocates. She told NBC News that Alliance Defending Freedom is nearly always involved in some way.

“Sometimes legislators tell us. Sometimes the ADF lawyers are there. Sometimes you can tell if you know that’s who did the bill in X state, and you see it again in Y state,” said Keisling.

Alliance Against LGBT rights?

Alliance Defending Freedom is a nonprofit law firm founded in 1994 by six notable conservative Christian men: James Dobson of Focus on the Family; Bill Bright and Larry Burkett of Campus Crusade for Christ; Marlin Maddoux of International Christian Media; D. James Kennedy of Coral Ridge Ministries; and Alan Sears, former director of the anti-pornography Meese Commission and author of the 2003 book "The Homosexual Agenda: Exposing the Principal Threat to Religious Freedom Today."

According to its June 2015 financial disclosure, ADF’s work includes training and support, public education, and legal advocacy that “champions inherent God-given freedoms that allow for the flourishing of all people throughout the world while affirming the dignity of every person as created in God’s holy image.”

Related: ICE Arrests Transgender Woman Seeking Help for Domestic Violence

The Southern Poverty Law Center describes the Alliance Defending Freedom mission differently: “Making life as difficult as possible for LGBT communities in the U.S. and internationally” by fighting against same-sex marriage and transgender people's access to private facilities.

In 2016, the Southern Poverty Law Center designated ADF an “active hate group” in a list that includes Westboro Baptist Church, KKK chapters, and Neo-Nazi groups. In a report, SPLC cited ADF’s briefs in the 2003 Lawrence v. Texas case in which the firm argued for criminalizing gay sex through sodomy laws, and claimed ADF was behind efforts to keep sodomy laws on the books in Belize.

Alliance Defending Freedom attorney Kellie Fiedorek told NBC News that SPLC's claims of an international effort to criminalize gay sex were "simply false."

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"As the largest religious freedom legal advocacy organization in the world," said Fiedorek, "ADF has no interest in responding to an extreme and increasingly irrelevant group which obviously has too much time on its hands to do anything constructive."

Fiedorek denied that ADF is motivated by anti-LGBT sentiment: "Nothing could be farther from the truth."

But Heidi Beirich, director of Southern Poverty Law Center's Intelligence Project, said the choice to designate ADF a "hate group" was not made lightly.

"We don’t put a group on the hate list because they are against gay marriage," said Beirich. "Where the rubber hits the road is when ADF attorneys engage in model legislation and litigation that attacks the LGBT community."

Why Wage War Over Bathrooms?

Alliance Defending Freedom was formed, they say, to protect the religious freedom of American Christians. But while some speech defenses and similar cases were among the firm’s early work, its polarized political stance became clear over time.

After Massachusetts became one of the first states to legalize same-sex marriage in 2003, ADF issued a blistering statement in which every single reference to gay relationships was placed in scare quotes.

Related: Trans Teen Gavin Grimm Slams Trump Policy at Congressional Meeting

"Radical homosexual activists have made their intentions clear – ‘couples’ will now converge on Massachusetts, ‘marry,’ and return to their respective states and file lawsuits to challenge Defense of Marriage Acts (DOMAs) and try to force the states to recognize their ‘marriages.’ We are disappointed but we’re going to continue the fight state by state,” wrote longtime ADF president Alan Sears at the time.

In his 2004 book "Marriage Under Fire," co-founder James Dobson wrote that legalized same-sex marriage would “destroy the fundamental principles of marriage, parenthood, and gender,” lead to polygamy and bestiality, and bring about “the fall of Western civilization itself.” In a more recent 2011 blog post on his website, Dobson even suggests that gay marriage could bring a Biblical flood to the earth: “The culture war will be over, and the world will because ‘as it was in the days of Noah.’”

People celebrate in front of the U.S. Supreme Court after the ruling in favor of same-sex marriage June 26, 2015 in Washington, DC. Mark Wilson / Getty Images

After same-sex marriage became legal through a 2015 Supreme Court decision, it appeared what Dobson called the “homosexual agenda” had won. ADF still proselytizes against same-sex marriage on its website, where it claims that the children of lesbian parents are four times more likely to be raped (according to a flawed study by Christian author Mark Regnerus that was roundly criticized by social scientists and child-welfare groups) and that "redefining marriage...harms society." But the marriage issue is largely settled law. Since early 2016, ADF news releases have focused less on marriage and more often on protecting the privacy of children in schools, its code phrasing for anti-transgender bathroom bills, an NBC News analysis found.

Fiedorek refuted the idea that bathroom bills are anti-transgender discrimination in disguise.

"The bills protecting privacy are simply ensuring that when it comes to intimate facilities, they are simply limiting them to biological sex. We all have a right to privacy," said Fiedorek. "Even if you believe you are a man, a woman shouldn’t have to undress in front of you."

Fiedorek cited the concession that sex-segregated legislation frequently includes, allowing transgender students to use single-stall restrooms used by teachers or other adult school officials.

But Gavin Grimm, the Gloucester County, Virginia teen who became the face of transgender students when his school battle was scheduled for arguments at the Supreme Court, said those concessions create extra obstacles for students. Speaking to Congress at a Thursday hearing on civil rights, Grimm described a scenario similar to the restroom scenes in the film "Hidden Figures."

“The nurse’s office was far away from my classrooms that year,” said Grimm. “It took far too much time each day, trekking back and forth, just to use the restroom.”

Grimm tired of the long walk to the nurse’s office and asked to use the boy’s room. His school complied, he said, and male classmates took no issue with seeing him in the restroom—until word got out and the school board scheduled a public meeting Grimm described as “humiliating” and “frenzied,” where adults called him a “freak” and demanded the school board vote to bar him from the male facilities at school.

How ADF Set the Standard for Bathroom Bills

Records show ADF’s intimate involvement in three of the most prominent transgender-rights battles at state legislatures over the past few years.

ADF attorneys helped local pastors in Houston, petition and sue in opposition to the city’s 2014 anti-discrimination ordinance known as HERO. The next year, according to documents obtained by attorney Roberta Kaplan through a Freedom of Information Act request and shared with NBC News, ADF senior counsel Austin Nimocks supplied Mississippi Gov. Phil Bryant with legislation the governor would sign into law 10 months later.

On March 31, just six days before Bryant signed the Religious Liberty Accommodations Act, Fiedorek offered her help with “PR/messaging/support” and said ADF wanted to “help come behind you all however we can with national support and cover as well as activating folks in the state.”

The Mississippi bill — which is currently being challenged in federal court — protects those who believe that marriage is heterosexual only, that sex should be reserved to marriage, and that gender is limited to sex at birth. The detailed and specific legislation allows employers to fire LGBT people, deny them housing, deny adoption services, deny healthcare, block transgender people from restrooms, and deny a slew of other services — all under the guise of citing religious beliefs.

Protesters call for Mississippi Gov. Phil Bryant to veto House Bill 1523, which they say will allow discrimination against LGBT people, during a rally outside the Governor's Mansion in Jackson, Miss., on April 4, 2016. (AP Photo/Rogelio V. Solis) Rogelio V. Solis / AP

In early 2016, photos on the ADF website show Fiedorek speaking at a North Carolina rally protesting the Charlotte, North Carolina, non-discrimination ordinance just two days before McCrory signed HB2 and dictated transgender bathroom use statewide.

When asked about ADF's role in the days leading up to HB2, Fiedorek told NBC News "We weren’t involved directly in the drafting of HB2."

"But in the days that followed we provided advice and legal advice," Fiedorek said of North Carolina's controversial law, "And were involved in some of the litigation after [HB 2] was passed."

In April 2016, the Human Rights Campaign (HRC) filed a detailed Freedom of Information Act request asking for correspondence between ADF attorneys and the governor, legislators, or the executive branch. Sarah Warbelow, HRC’s legal director, told NBC News that the FOIA was denied after the North Carolina General Assembly “falsely claimed they had privilege not to disclose what we requested even though we had requested external communications that would not be privileged under North Carolina law.”

Warbelow spoke with NBC News the day after the General Assembly voted to replace HB 2 with a similar law, frustrating LGBT advocates. She said HRC plans to continue exploring the relationship between North Carolina policy and Alliance Defending Freedom — noting that the state’s legislators appeared to draw from ADF “talking points” in the weeks after HB 2’s passage last year.

But while ADF attorneys like Matt Sharp sometimes brag about the firm’s influence on lawmaking, LGBT advocates suspect that the scope of the influence is much wider than anyone actually realizes.

“It’s a little concerning and shady when organizations aren’t willing to be public about their engagement,” said Warbelow, “and forthright about how they are working to influence legislation around the country.”