Trump wanted to kick all trans people out of the military. Instead, starting on Jan. 1, they can now openly enlist for the first time in history.

Donald Trump rang in the new year with the abject failure of one of his bigoted policy goals.

In July, Trump made a callous move to ban transgender soldiers from the military, seeking to undo a partially implemented directive made by President Barack Obama’s Department of Defense, which would let them serve openly after years of prohibition. Trump’s decision was so ad hoc and off the cuff that the Pentagon only learned about it after he tweeted it.

Trump justified the move by claiming it would cost too much to give reassignment surgery to trans soldiers — even though the cost of transitioning every soldier in the armed forces would be no higher than four of Trump’s vacations to Mar-a-Lago.

But Trump’s plan rapidly imploded as two federal judges ruled his order illegal, forcing the Pentagon to continue with the initial 2016 directive allowing trans people to openly serve.

And on Jan. 1, Trump’s efforts hit a new milestone of failure. As of that date, under the 2016 order, the military will allow the enlistment of openly trans people.

So now, not only are the current 6,000 trans soldiers protected from Trump’s ban, but the military will also allow more trans people to enlist without lying about who they are.

With marriage equality now the law of the land, Republicans in recent years have shifted the battlefield on LGBT rights to shutting trans people out of public spaces, and it has been failing spectacularly. “Bathroom bills” around the country triggered widespread outrage, costing the GOP governor of North Carolina his job, derailing Republicans’ special session in Texas, and leading to Democratic gains in the Virginia House of Delegates.

Trump and his Republican allies cannot drag equality out of public society. And they seem determined to learn that lesson the hard way.