President Donald Trump is junking former President Barack Obama’s unpopular federal pro-transgender policies, according to the White House spokesman.

The policy reversal will likely protect single-sex civic groups and institutions — including single-sex bathrooms — across the nation from lawsuits and will put new pressure on federal judges to preserve the central role of biology in defining whether a person is male or female.

The new policy is a big defeat for gay advocacy groups and for progressives, who want judges to declare that people can change their legal sex when their “gender identity” changes from day to day.

The announcement came Tuesday from White House spokesman Sean Spicer, who said, “the president has maintained for a long time that this is a states’ rights issue and not one for the federal government.”

“So while we have further guidance coming out on this, I think that all you have to do is look at what the president’s view has been for a long time, that this is not something the federal government should be involved in, that this is a states’ rights issue,” he added.

Trump’s deference to the states will force the cancellation of the federal “gender identity” policy announced in May 2016 by Obama’s deputies.

Numerous states are already debating how sex should be defined. In North Carolina, for example, the GOP-drafted HB2 2016 law says people can change their legal sex after surgery. That clear biology-based distinction is strongly opposed by gay advocacy groups, who helped lead an economic boycott of the state in 2016. Other states, such as Oregon and Washington have decided that people — including children — have a fundamental right to change their legal sex, regardless of the impact on civic society.

Less than one-quarter of Americans support the “gender-identity” plan pushed by gay groups and by Obama, which would allow transgender activists to sue single-sex institutions — such as sports leagues, public shower-rooms, and women’s shelters — until they treat both biological sexes as interchangeable. That would be a very different regime from today’s laws and civic society, which are designed to help two equal and different sexes complement each other in a heterosexual society built on families and child rearing.

The process has already forced the Boy Scouts to accept girls, and will also force teacher and parents to change how they educate young boys and girls, say critics.

Since Trump’s election, Obama has twice admitted that his unpopular transgender policy helped defeat Hillary Clinton.

The Supreme Court is scheduled to hear a lawsuit from a young woman in Virginia who wants school officials — and schoolkids — to declare that she is a he. The court has not revealed where it stands on the issue, but in 2015, the Court changed the definition of marriage nationwide so that states could not define marriage as a mixed-sex relationship.

Only about one-in-2,400 Americans have changed their names from one sex to the other, according to a study of the 2010 census.

To read more Breitbart coverage about the clash between “gender identity” and heterosexual society, click here.