TOPEKA, Kan. (AP) — Republican-led Kansas will challenge in court the Obama administration's directive that public schools allow transgender students to use the restroom that matches their gender identity, the state's attorney general said Wednesday, although he has not yet decided whether to join a lawsuit by 11 other states or sue separately.

The state Senate lauded Attorney General Derek Schmidt for announcing the intent to legally challenge the U.S. Departments of Justice and Education, which issued the order. Texas and 10 other states already have filed suit against the federal government over the directive. Kansas Republican legislators also urged the Republican-majority U.S. Congress to blunt the directive by passing legislation that protects privacy rights.

Senators voted 30-8 along party lines Wednesday for a non-binding resolution condemning the federal decree, despite pleas from Democrats that the last day of the legislative session be spent focusing on funding poor public schools.

The Obama administration directive tells schools to allow transgender students to use the bathroom of the gender they identify with, not their sex at birth. Some Republicans have criticized this as forcing a social experiment on public schools.

The Senate voted on the resolution as Kansas struggles to comply with a state Supreme Court ruling that the Legislature has failed to adequately fund poor public schools and gave the lawmakers until June 30 to respond. Opponents of the transgender resolution said it was a distraction from the urgent need to act on school funding.

During the debate, Democratic Sen. Tom Hawk, a retired junior high counselor and teacher in Manhattan, said he regretted not doing more to protect some former students who were harassed in school because others thought they might be gay and later committed suicide.

"I still search my soul and I wonder if I could have helped them more, if I could have stood up for them," explained Hawk, who opposed the resolution. "Today I get a second chance to stand up for these young people."

Republican Sen. Steve Fitzgerald retorted that transgender people are detached from reality.

"I'm not surprised that those who are confused about their sex have a high rate of suicide," Fitzgerald said. "Suicide does have a high rate with those who are afflicted with some form of insanity."

Schmidt said in his statement announcing the legal challenge that the federal government had overreached.

"In our federal system of government, not every decision needs to be handed down from Washington, and this is a matter best left to state or local authorities, including school boards, as it traditionally has been - and as the law requires," Schmidt said in a press release.

Schmidt said conservative Republican Gov. Sam Brownback also wants the state to fight the decree.

Equality Kansas, the state's leading LGBT group, held a rally Wednesday on the ground floor of the Kansas Statehouse to oppose the proposed resolution. Transgender activists and a few religious clergy called accessibility to restrooms a human right.

"Transgender people have been around for millennia. Contrary to popular conservative thinking, we've actually been going to the bathroom and using restrooms this whole time," transgender activist Sandra Meade said to applause.

Tom Witt, executive director of Equality Kansas, also rebuked legislators for using the final day of the session to focus on the federal directive instead of the school funding formula.

"I think that the priorities of our Legislature are completely skewed," Witt told the AP.