Defense Secretary James Mattis was caught off guard by President Trump's announcement that he was banning transgender people from serving in the military, according to a New York Times report.

Mattis, who was on vacation at the time of Trump's decision, only had one day's worth of notice before Trump tweeted his announcement of the policy, the paper reported.

The report described him as "appalled."

Sources close to the Defense secretary told the Times that Mattis was infuriated by the tweets, and saw them as an insult to transgender Americans currently serving in the military.

On Wednesday morning, Trump wrote on Twitter that “after consultation with my Generals and military experts, please be advised that the United States government will not accept or allow transgender individuals to serve in any capacity in the U.S. Military."

ADVERTISEMENT

"Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail,” Trump added. “Thank you."

A letter from Joint Chiefs of Staff Chairman Gen. Joseph Dunford on Thursday indicated that the policy would not be changed until the White House issued further "guidance."

“There will be no modifications to the current policy until the president’s direction has been received by the secretary of defense and the secretary has issued implementation guidance,” Dunford wrote.

Mattis, according to the Times, had been quietly lobbying Republicans for months to defeat a GOP-led amendment to the 2017 spending bill that would prevent the military from spending money on transition surgery or hormone therapy for transgender service members. The report states that Mattis initially resisted the policy allowing transgender Americans to serve in the armed forces, but accepted that the policy was to remain in place.

His predecessor, former Obama Defense Secretary Ash Carter, ripped the Trump administration for reversing the policy.

“To choose service members on other grounds than military qualifications is social policy and has no place in our military,” Carter said in a statement. “There are already transgender individuals who are serving capably and honorably.

"This action would also send the wrong signal to a younger generation thinking about military service.”

Carter wasn't the only critic of Trump's announcement. Sen John McCain John Sidney McCainBiden's six best bets in 2016 Trump states Replacing Justice Ginsburg could depend on Arizona's next senator The Hill's Morning Report - Sponsored by Facebook - Washington on edge amid SCOTUS vacancy MORE (R-Ariz.) joined several colleagues to criticize the policy, as well as the decision to announce it in tweets.

“There is no reason to force service members who are able to fight, train and deploy to leave the military — regardless of their gender identity,” McCain said Wednesday after the announcement.

He called Trump's announcement “yet another example of why major policy announcements should not be made via Twitter.”

Thousands of service members could be affected by Trump's new policy. A 2016 study found that anywhere from 2,000 to 11,000 active-duty service members identify as transgender. The study noted that not all of these service members will seek transition surgery or hormone therapy while part of the military.