Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump announced Wednesday a ban on transgender people serving in the military, reversing U.S. policy in a series of tweets.

"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. 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. Thank you," Trump wrote in a trio of consecutive tweets.

The abrupt policy shift will affect thousands of transgender troops in the military.

After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow...... — Donald J. Trump (@realDonaldTrump) July 26, 2017

....Transgender individuals to serve in any capacity in the U.S. Military. Our military must be focused on decisive and overwhelming..... — Donald J. Trump (@realDonaldTrump) July 26, 2017

....victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail. Thank you — Donald J. Trump (@realDonaldTrump) July 26, 2017

Trump’s announcement came just over a year after former President Barack Obama’s then-Secretary of Defense Ash Carter lifted a ban on transgender military service — a move that allowed active-duty troops to come out of the closet as transgender people.

In the year since the ban was repealed, roughly 250 service members have applied to change their gender in the military's personnel system, Pentagon officials told the Associated Press in June.

White House Press Secretary Sarah Huckabee Sanders said Wednesday that Trump's announcement was "a military decision" and was "not meant to be anything more than that," adding that that the president's administration believed the decision reached last year by the Obama administration "erodes military readiness and unit cohesion."

Sanders, taking questions at her daily press briefing, did not provide any information on how or when the Pentagon and White House would begin implementing the new ban.

When asked how the administration would deal with transgender troops currently serving and who are already deployed in far-flung places like Afghanistan, Sanders said only that the "implementation is something that the Department of Defense and the White House have to work together to lawfully determine."

"I imagine the Department of Defense will be the lead on this," she said.

Trump’s tweets Wednesday, however, seemed to catch the Pentagon off guard, coming more than an hour before the Defense Department released its own brief statement on the matter, in which it referred "all questions about the President's statements to the White House."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"We will continue to work closely with the White House to address the new guidance provided by the Commander-in-Chief on transgender individuals serving the military," Pentagon spokesman Jeff Davis said. "We will provide revised guidance to the Department in the near future."

The Department of Defense website still reflects information about the policy change implemented by Carter in 2016.

At the time, Carter had set a July 1, 2017, deadline for the military to begin enlisting new transgender service members, but the agency did not meet that target date.

Republican presidential nominee Donald Trump holds a rainbow flag given to him by supporter Max Nowak during a campaign rally at the Bank of Colorado Arena on the campus of University of Northern Colorado October 30, 2016 in Greeley, Colorado. Chip Somodevilla / Getty Images file

In June, the chiefs of the Army, Navy, Air Force and Marine Corps met with the Trump administration's Secretary of Defense, James Mattis, to negotiate a six-month extension to the original July 1 deadline.

According to a RAND research study released in 2016, there were estimated to be 1,320 to 6,630 active transgender service members before the ban was lifted last year, and another approximately 1,500 on reserve.

The Human Rights Campaign, a prominent gay rights group, has estimated that there are more than 15,000 active serving transgender troops.

Lawmakers — including Republicans — blasted Trump’s sudden policy reversal.

"No American, no matter their sexual orientation or gender identity, should be prohibited from honor + privilege of serving our nation #LGBT," tweeted Rep. Ileana Ros-Lehtinen, R-Fla., who has a transgender son and is retiring from Congress next year.

Sen. John McCain, R-Ariz., who chairs the Senate Armed Services Committee, said Trump's tweets were "yet another example of why major policy announcements should not be made via Twitter."

"The Department of Defense has already decided to allow currently-serving transgender individuals to stay in the military, and many are serving honorably today," he said. "Any American who meets current medical and readiness standards should be allowed to continue serving. 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."

Sen. Joni Ernst, R-Iowa, who served in the Iowa Army National Guard for 23 years, with deployments to Kuwait and Iraq, also criticized the measure.

"As a veteran, Senator Ernst served alongside fellow service members from all different backgrounds and parts of the county," said her spokeswoman, Brook Hougesen. "While she believes taxpayers shouldn't cover the costs associated with a gender reassignment surgery, Americans who are qualified and can meet the standards to serve in the military should be afforded that opportunity."

Sen. Orrin Hatch, R-Utah, said he did "not think we should be discriminating against anyone" and that "transgender people are people, and deserve the best we can do for them." Sen. Lindsey Graham, R-S.C., added that he wanted "a hearing about" the issue, "not a tweet."

Senator Hatch's full comments on the issue of transgender Americans in the military. #utpol pic.twitter.com/EDS6JRXJaj — Senator Hatch Office (@senorrinhatch) July 26, 2017

The Log Cabin Republicans, a group of gay conservatives, slammed Trump's move, saying it "smacks of politics, pure and simple."

"Excommunicating transgender soldiers only weakens our readiness; it doesn’t strengthen it," the group's president, Gregory T. Angelo, said. Trump's "statement this morning does a disservice to transgender military personnel and re-introduces the same hurtful stereotypes conjured when openly gay men and women were barred from service during the military’s ‘Don’t Ask, Don’t Tell’ era," he added.

No American, no matter their sexual orientation or gender identity, should be prohibited from honor + privilege of serving our nation #LGBT — Ileana Ros-Lehtinen (@RosLehtinen) July 26, 2017

"Astonishing @realDonaldTrump ever claimed to be ‘friend’ to LGBT people. #transgender soldiers deserve thanks, not arbitrary expulsion," the LGBT congressional caucus tweeted.

"Transgender Americans are serving honorably in our military. We stand with these patriots," tweeted Senate Minority Leader Chuck Schumer, D-N.Y.

Other Democrats drew attention to the fact that Trump's tweets came on the 69th of former President Harry Truman’s executive order to desegregate the U.S. armed services.

Many Republican lawmakers ducked questions about Trump's reversal, while Family Research Council President Tony Perkins, a Marine veteran, praised the president's decision.

"I applaud President Trump for keeping his promise to return to military priorities — and not continue the social experimentation of the Obama era that has crippled our nation’s military," Perkins said.

"The military can now focus its efforts on preparing to fight and win wars rather than being used to advance the Obama social agenda," he added. "President Trump recognizes what the nation's military leadership and the American people realize, this Obama policy makes no sense."

Sen. Kirsten Gillibrand, D-N.Y., said she would "introduce legislation and will fight to overturn this discriminatory decision," while Sen. Ron Wyden, D-Ore., took issue with Trump using Twitter to make sure an important announcement, slamming the president for "making national security policy by tweet."

Carter, the former defense secretary, also weighed in, saying that "to choose service members on other grounds than military qualifications is social policy and has no place in our military."