President Donald Trump at a press conference in the Rose Garden of the White House. Thomson Reuters

President Donald Trump tweeted Wednesday that the US military would not accept transgender people, saying their service would cause "tremendous medical costs and disruption."

"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," Trump said in a series of tweets.

Trump's announcement is a reversal of President Barack Obama's decision in 2016 to allow transgender people to openly serve, though the implementation of that policy had been delayed by Secretary of Defense Jim Mattis.

A Pentagon statement to Business Insider referred all questions "about the president's statements" to the White House but did say the Pentagon would "work closely" with the White House to "address the new guidance provided by the commander-in chief on transgender individuals serving the military."

Senior officials in each branch of the military had voiced opposition to integrating transgender people leading up to Trump's announcement, the Military Times reports.

Unlike Obama, who took an active hand shaping the Pentagon's operations, Trump has been known to defer to military leaders' judgment in defense issues. The extent of Trump's involvement in developing the policy is unclear.

But a Trump administration official talking to Jonathan Swan, a politics reporter at Axios, did suggest a political motive for the move.

"This forces Democrats in Rust Belt states like Ohio, Michigan, and Wisconsin, to take complete ownership of this issue," Swan quoted the official as saying. The official questioned how blue-collar voters would react when senators up for reelection "are forced to make their opposition to this a key plank of their campaign."

How this will affect the transgender people already serving in the military also remains unknown. Up to 10,700 transgender people may already be serving in the US military, according to a 2016 study by the RAND Corporation.

Pentagon spokesman Army Lt. Col. Myles Caggins told the Military Times that "just like their fellow service members," transgender people "receive all medically necessary care," which could include gender-reassignment surgery.

RAND Corp. estimated that 29 to 129 of the US military's 1.4 million troops would most likely seek reassignment surgery each year. The procedure itself can cost upward of $100,000 and accompany a lengthy hormone treatment process.

Politicians and veterans have vociferously come out in opposition of the ban. Rep. Dan Kildee, a vice chair of the LGBT Equality Caucus, called the move a "slap in the face to the thousands of transgender Americans already serving in the military." Retired US Navy SEAL Kristin Beck, who is transgender, objected to Trump's statement on the cost of transgender people in military, saying "the money is negligible ... You're talking about .000001% of the military budget."

Trump has also reversed Obama's policy on guiding public schools to allow transgender students to use the bathroom that corresponds with their gender identity.