Updated at 9:46 P.M. to clarify original case. See below for corrections.

One battle in the bathroom wars has just ended. Or maybe a truce has been hammered out for the time being.

The U.S. 4th Circuit Court has ruled in favor of a female-to-male trans student who was banned from using his school's boys bathroom. A lower court had issued a preliminary injunction against the student while the case was moving forward. Now the Circuit Court, whose rulings also cover North Carolina (site of a contentious new law covering similar issues), ruled the injunction was illegal and has ordered the lower court to hear his discrimination lawsuit.

"The Department [of Education's] interpretation resolves ambiguity by providing that in the case of a transgender individual using a sex-segregated facility, the individual's sex as male or female is to be generally determined by reference to the student's gender identity,"Judge Henry Floyd wrote in Tuesday's majority opinion.

Read more here.

Update: My original summary of the case involving Gavin Grimm misstated several basic facts. Currently a high school junior who transitioned during his sophomore year, Grimm attends school in Gloucester County, Virginia. During his sophomore year, he was allowed to the use the boys restrooms at his school for several weeks which, according to The Guardian, passed without incident. At the start of his junior year (and after a series of public school board meetings), he was denied access to the boys room and was instead instructed to use a unisex facility that the school built specifically for him. He and his parents sued the school district under Title IX for discrimination but that case was dismissed last fall.

In The Guardian's summary of today's action, "Tuesday's ruling orders the lower court to reconsider his petition to access the boys' bathroom while the case is ongoing, but it is not the final decision in Grimm's case." The lower court will adjudicate the case following the Circuit Court's interpretation.

As NPR noted in its coverage of the ruling, in 2015 the Department of Education issued a memo saying that when public schools receiving federal dollars (read: all of them) separate students based on sex, they "generally must treat transgender students consistent with their gender identity."

Thanks to Hans Bader of Competitive Enterprise Institute for pointing out my misreading of the case.

Go here to read recent Reason musings on North Carolina's new bathroom law and, perhaps more important, the weird, long, and awful history of how governments at all levels can't stop setting policies for private establishments while also being openly discriminatory in how they run the facilities that they actually operate.

I'm willing to bet the farm that even within a few years, if not sooner, we will all look back on the absolute panic evinced over the issue of unisex bathrooms and wonder just what the fuck we were all smoking.

As a good libertarian, I believe that private establishments (including those deemed public accommodations under antidiscrimination statutes) should be given as much latitude as possible to decide how and if they want to serve customers. Having said that, to the extent that antidiscrimination laws already apply to protected racial and gender groups, there seems to me no good reason to exclude sexual orientation and gender identification from those categories.

So yes, the state should GTFO of all of this, but as with marriage, if it's involved, then it should treat individuals equally. It seems to me that conservatives, having lost battles over public homosexuality and marriage equality, are now glomming onto another losing reactionary position when it comes to trans identity. I find it appalling that any baker or florist anywhere has been punished for not wanting to bake a cake for a gay couple; it's especially screwed up when they essentially get sent to state-mandated therapy to fix their minds. And yet that doesn't let the state (and conservatives) off the hook for decades of refusing to treat gays and lesbians equally. To be clear: I think that people who refuse to serve gay people or accommodate trans people are bigots, plain and simple, and I don't really care if they think that way because they are religious or secular or just hung up. But I also do not think it's the role of the state to cure them of their stupidity.

It strikes me that the popular conservative argument that private businesses which are in no way religious somehow become faith-based entities the second the proprietor decides he doesn't want to provide some services to some customers is both mendacious and a lost cause in the long run. The Little Sisters of the Poor are a religious outfit that exists only to bring greater glory to God as they define him; that's why they have broad sympathy in fighting government mandates that contradict their theology. When it comes to businesses whose primary concern is turning a buck, it's a different story, though. As someone who takes the right of conscience very seriously, I'm bothered by reactionaries who are simply willing to drag religion in to slag whatever lifestyle they happen to find distasteful.

Conservatives generally are not willing to make a principled case against antidiscrimination laws because doing so is unpopular; the long history of conservatives supporting racial segregation well past the rest of the country had moved on from it can't be easy for them to revisit. Instead, they are trying to recast their particular positions against accommodating trans people (and before them, gay people, and before that, racial minorities and women) as some test of religious freedom because they say the Bible is against Bruce Jenner becoming Caitlyn Jenner or something. Good luck with that. I get it: You're freaked out by trans people, even to the point of trying to force business owners to make sure that all customers use bathrooms based on the sex listed on their birth certificates (as a Florida legislator attempted to do last year).

In the best of all possible worlds, private schools would do whatever they want. Public schools can and should figure out ways to accommodate the vanishingly small number of trans students in ways that respect individual rights and don't inflame fear or hatred (of course, this is already happening but such stories don't generate headlines). Schools, especially public schools, have a long and inglorious history as incubators not of individualism and intellectual growth but as miniature versions of the island in Lord of the Flies. You look at the picture of that kid up at the top and you figure that he's almost certainly taken more shit in his brief 16 years than all of us "normals" reading this piece will in our combined lifetimes. Life shouldn't be that way, should it? Especially not at school, where attendance is mandatory.

Sadly, the state has never been great at treating people equally before the law. But the ruling in Virginia today is at least one baby step in the right direction.