WASHINGTON — Senate Armed Services Committee Chairman John McCain on Friday sharply criticized President Donald Trump’s ban on transgender individuals serving in the military, saying it could hurt the military.

“It would be a step in the wrong direction to force currently serving transgender individuals to leave the military solely on the basis of their gender identity rather than medical and readiness standards that should always be at the heart of Department of Defense personnel policy,” the Republican Arizona senator said in a statement released just before midnight.

“The Pentagon’s ongoing study on this issue should be completed before any decisions are made with regard to accession.”

Earlier in the evening, White House officials announced details of the military’s new transgender policy, broadly outlined by Trump in a series of tweets earlier this month.

A presidential memo sent to the Pentagon on Friday reverses the previous policy of allowing transgender individuals to serve openly and receive medical care for treatment of gender dysphoria or related issues.

Instead, Trump’s order directs that the Pentagon (and the Department of Homeland Security, in the case of Coast Guard personnel) halt the use of any funds for sex reassignment surgery, and bars entry of any transgender recruits into the services.

It also directs Defense Secretary Jim Mattis to determine whether currently service transgender personnel should be allowed to stay in the ranks, using “military effectiveness and lethality, budgetary constraints and applicable law” as standards for dismissal.

Democrats on Capitol Hill responded to the news with outrage.

House Armed Services Committee ranking member Adam Smith, D-Wash., called the move “a cravenly opportunistic act of discrimination against men and women who volunteer to defend the United States.” Iraq War veteran Sen. Tammy Duckworth, D-Ill., said the move will be “disruptive to our military” and harm unit readiness.

But as the senior Republican voice on military matters in Congress, McCain’s criticism carried more weight. The former Navy pilot and 30-year senator has sparred with Trump increasingly in recent weeks, including casting one of the deciding votes to shelve plans for a repeal of the Affordable Care Act.

McCain in his statement of opposition said the armed services committee will conduct oversight on the issue in weeks to come. Congress returns to Capitol Hill from a summer legislative recess in early September.