When President Donald Trump tweeted his reversal of the Obama-era decision to allow transgender people to openly serve in the military on Wednesday, his secretary of defense, Jim Mattis, was on vacation and appalled by the move, according to the New York Times.

Mattis apparently only had one day’s notice about the proposed transgender ban, which he had labored over for months while evaluating how to implement the Obama policy.

Sources close to Mattis told the Times that he was “appalled” by Trump’s rollout of the transgender ban, which shocked many in the Pentagon and left active-duty transgender service people unsure of their fate.

Trump’s decision to “not accept or allow” transgender service people comes after Obama essentially invited them to come forward and openly express their gender identity. It also follows a 2016 study commissioned by the Pentagon that found that transgender inclusion would have “have minimal impact on readiness and health care costs” for the 1.4 million strong US military.

White House Press Secretary Sarah Huckabee Sanders said that Trump made the move to protect “military readiness and unit cohesion,” and that the White House would work with the Pentagon to implement the policy “lawfully.”

But multiple congressional sources told Politico that Trump actually rushed the decision to nail down the last few remaining votes on a $790 billion spending bill that included money for a border wall, one of Trump’s first campaign promises.

Recommended

In The Military? Tips For Saving Money At Every Stage

Think Your Absentee Ballot Doesn’t Matter? Here’s Proof It Does

9 Ways To MacGyver Your Life With A Rip It Can

10 Essential Fieldcraft Survival Tips, According To A Veteran

How This Soldier Used His Military Skills To Build A Career And Serve Veterans At Sodexo

When infighting between House GOP representatives threatened to derail the spending bill if it didn’t prohibit spending defense funds on treatment for transgender service people, some representatives sought out Trump to take care of the problem via executive action, according to Politico.

Trump responded by not only suspending funding, but announcing a complete ban on transgender service.

“This is like someone told the White House to light a candle on the table and the [White House] set the whole table on fire,” a senior House Republican aide told Politico.

More from Business Insider:

WATCH NEXT: