Republican presidential nominee Donald Trump addresses supporters on the final day of the Republican National Convention on July 21, 2016, in Cleveland. (Ricky Carioti/The Washington Post)

There are two apparent ironies at the heart of the Trump administration’s announcement Wednesday afternoon that it would rescind an Obama-era order allowing transgender students to use the school bathroom matching their gender identities.

The first is the reason offered for the reversal: that, as The Post reported, it “lacked extensive legal analysis, did not go through a public vetting process, sowed confusion and drew legal challenges.” None of those problems prevented President Trump from signing an executive order on immigration that similarly lacked public vetting, sowed confusion and drew legal challenges. The administration didn’t rescind that order; it plans to continue to fight for it in the courts.

The second irony is that Trump pledged on the campaign trail to be receptive to LGBT issues.

During his speech at the Republican convention accepting his party’s nomination, Trump specifically defended “our LGBTQ community.” The “T” in “LGBTQ” stands for transgender.

“As your president,” he said, “I will do everything in my power to protect our LGBTQ citizens,” then adding a critical qualifier, “from the violence and oppression of a hateful foreign ideology.”

The convention was shortly after the attack at the Pulse nightclub in Orlando, a deadly shooting that allowed Trump to frame his support for gay and transgender Americans through his favored lens of the fight against terror. Shortly after the attack, he tweeted to the LGBT community that he would “fight for you” — unlike Hillary Clinton, who “brings in more people that will threaten your freedoms and beliefs.”

Those “people,” of course, are the terrorists who Trump argues would sneak into the U.S. among refugees and illegal immigrants.

“Ask yourself,” he said during a speech shortly after the attack, “who is really the friend of women and the LGBT community: Donald Trump with his actions, or Hillary Clinton with her words? Clinton wants to allow radical Islamic terrorists to pour into our country — they enslave women, and murder gays.”

Those were the remarks as prepared for delivery. He said that, but interjected a sentence before the part about what Clinton wants.

“By the way,” he interjected, “the LGBT community is just — what’s happened to them is just so sad, and to be thinking about where their policies are currently with this administration is a disgrace to that community, I will tell you that right now.”

There was a 24-hour period in which Trump seemed to be aligned with one of those administration policies — specifically, the one he rescinded Wednesday.

In an interview with the “Today” show last April, Trump opined against a law in North Carolina that barred transgender people from using their preferred bathrooms. The effect of the law was dramatic: A number of businesses, including the NCAA basketball tournament, pulled out of the state in response. Trump isolated this effect in his comments, saying that “There have been very few complaints the way it is. People go, they use the bathroom that they feel is appropriate, there has been so little trouble.”

He was asked whether Caitlyn Jenner — perhaps the most famous transgender person in America — could use the bathroom she chose at Trump Tower. He said she could.

There was even a rumbling, initiated by an unsourced report in the New York Post, that Trump might dance with Jenner at an inaugural ball. It didn’t happen, but Jenner defended Trump on the subject last summer.

“He seems very much behind the LGBT community because of what happened in North Carolina with the bathroom issue,” Jenner said. “He backed the LGBT community. But in Trump’s case, there’s a lot more unknowns. With Hillary, you pretty much know what you’re gonna get with the LGBT community.”

The problem, though, was that the day after his appearance on “Today,” Trump scaled back his support for transgender bathroom access. Speaking to Fox News’ Sean Hannity, Trump defaulted to a “let the state decide” line.

“I think that local communities and states should make the decision,” he said. “And I feel very strongly about that. The federal government should not be involved.”

The reason the government got involved under Obama was a simple one. “No student should ever have to go through the experience of feeling unwelcome at school or on a college campus,” then-Secretary of Education John B. King Jr. said. “We must ensure that our young people know that whoever they are or wherever they come from, they have the opportunity to get a great education in an environment free from discrimination, harassment and violence.”

In other words: The Obama administration sought to reduce the frustration and targeting of young transgender people. Suicide attempts are prevalent among transgender people; a study in 2014 found that half of those interviewed reported being harassed or bullied at school. That, of course, is a far larger percentage than the number of transgender people killed in terrorist attacks.

But then, in his convention speech, that’s the only threat against which he pledged to protect gay and transgender Americans. So maybe this week’s decision isn’t that ironic after all.