First came the shock and indignation and now the first major legal counter-attack. Two weeks after President Barack Obama told school districts across America to let transgender students use which ever toilet they liked, eleven US states, led by Texas, have hit back, filing a lawsuit challenging him.

The action, which accuses the Obama administration of trying to turn the nation’s schools into “laboratories for a massive social experiment”, is the latest convulsion in the transgender bathroom issue that has enraged conservative forces across the country and emerged as the civil rights issue of the moment in the United States.

On 13 May, the US Justice Department told North Carolina that a law it passed in March requiring all its citizens, including members of the transgender community, only to use the bathroom assigned to the gender on their birth certificate violated federal civil-rights laws.

The directive was couched as guidance to public administrations and school districts to desist from any attempt to follow North Carolina’s example and give freedom to transgender students to use the toilets or games’ locker rooms matching their chosen identities. It also carried a barely disguised threat that failure to heed the advice would lead to a withholding of federal funds.

“There is no room in our schools for discrimination,” Loretta Lynch, the US Attorney General, said unveiling the directive and evoking the days of racial segregation in the schools system in the US.

“This is not the first time that we have seen discriminatory responses to historic moments of progress for our nation,” Ms Lynch said. “We saw it in the Jim Crow laws that followed the Emancipation Proclamation. We saw it in fierce and widespread resistance to Brown v. Board of Education (which ordered schools desegregation).

“This action is about a great deal more than just bathroom. This is about the dignity and respect we accord our fellow citizens and the laws that we, as a people and as a country, have enacted to protect them – indeed, to protect all of us.”

Pressure on North Carolina to amend or rescind its controversial law was already intense amidst a burgeoning boycott of the state. Artists like Ringo Starr and Bruce Springsteen cancelled concerts there, business groups moved conventions elsewhere and some corporations, including PayPal and Deutsche Bank, canceled plans to invest there.

But the move by the Obama administration to force North Carolina’s hand was seen by many conservatives as the ultimate provocation in a new culture war they are determined not to lose. Of the eleven states that joined Wednesday’s lawsuit, 9 were led by Republican governors.

As well as touching on the latest sore nerve in that culture struggle - the progressive forces in the US have already triumphed in the passing of a national law allowing gay marriage - the action by Washington also spoke directly to the states’ rights issue, and the contention by conservatives that the federal government is overbearing and needs to be cut down to size.

Filed in federal court in Wichita, Kansas, the suit accused the federal government of attempting to introduce laws by “administrative fiat”, and named both the government and an assortment of federal agencies as defendants.

The suit is “challenging the way that the Obama administration is trampling the United States Constitution,“ Governor Greg Abbott told reporters. The Lone Star state had earlier said it would be willing to lose $10 billion in education funding from Washington rather than comply with the directive.

In addition to Texas, those joining the suit were Alabama, Wisconsin, West Virginia, Tennessee, Oklahoma, Louisiana, Utah and Georgia, plus the Arizona Department of Education and the governor of Maine. It asks the court to declare the federal directive unlawful.