In a series of tweets Wednesday morning, President Donald Trump said he will bar transgender individuals from serving in the U.S. armed forces "in any capacity" — a move which seemed to catch the Pentagon off-guard.

Trump said that after consulting with "Generals and military experts," that the government "will not accept or allow Transgender individuals to serve in any capacity in the U.S. Military."

He added that having transgender military members adds a "burden" of "tremendous medical costs and disruption."

The Pentagon, which appeared to be caught off-guard by Trump's tweets, referred questions about them to the White House.

In a brief statement, Pentagon spokesman Navy Capt. Jeff Davis said that the Pentagon is working with the White House to "address" what he calls "the new guidance" from the president on transgender individuals serving in the military, and the Pentagon would provide revised guidance "in the near future."

Trump's announcement comes about a year after the Obama administration approved a new Defense Department policy allowing transgender service members to serve openly in the military. Last month, Defense Secretary James Mattis said he was delaying implementation of that policy for six months to study it more.

"Since becoming the Secretary of Defense, I have emphasized that the Department of Defense must measure each policy decision against one critical standard: will the decision affect the readiness and lethality of the force?" Mattis said in a memo. "Put another way, how will the decision affect the ability of America's military to defend the nation?"

Reaction from lawmakers on the controversial move was swift.

Republican Sen. Richard Shelby of Alabama split with Trump on the move.

"Well, I think you ought to treat everybody fairly, and you ought to give everybody a chance to serve," he said.

But Florida Rep. Matt Gaetz, agreed with the president.

House Democratic leader Nancy Pelosi called Trump's action "a cruel and arbitrary decision designed to humiliate transgender Americans who stepped forward to serve our country."

Matt Thorn, executive director of OutServe-SLDN, which represents the LGBT population in the military, said thousands have been serving in the U.S. armed forces without causing any issues.

"It's an absolute absurdity and another overstep," Thorn said. He threatened legal action if Wednesday's decision is not reversed.

As for the president's assertion that transgender military members add a burden of medical costs, CNN posted a chart with information from a RAND Corporation study that estimated the cost to provide transgender-related services to active military personnel would amount to .004 to .017 percent of the Defense Department’s total health care spending, $2 million to 8 million in spending.

That same study estimated 25 to 130 gender transition-related surgeries are required a year for active duty service members.

According to several defense officials, there are as many as 250 service members in the process of transitioning to their preferred genders or who have been approved to formally change gender within the Pentagon's personnel system. The Pentagon has refused to release any data on the number of transgender troops currently serving. 

Information from CNN and the Associated Press was used in this report.

Timeline of US military policy on LBGT members