Sen. John McCain (R-Ariz.) walks from his Senate office in Washington. (J. Scott Applewhite/AP)

The top Republican on the Senate Armed Services Committee has joined an effort to challenge President Trump's announced ban on transgender troops, a sign that open resistance to the order is growing.

Sen. John McCain (R-Ariz.), a military hawk and one of the GOP's most outspoken critics of Trump, said in a statement Friday that he was backing the measure because "we should welcome all those who are willing and able to serve our country."

"Any member of the military who meets the medical and readiness standards should be allowed to serve — including those who are transgender," he continued.

The announcement from McCain came as he joined Sen. Jack Reed (D-R.I.), the ranking Democrat on the committee, and committee members Kirsten Gillibrand (D-N.Y.) and Susan Collins (R-Maine) in introducing a bill to thwart the president's plan.

McCain had previously been cagey about whether he would support the Gillibrand-Collins effort, noting that it might be premature, because the ban had not gone into effect. He did, however, promise to let senators offer any amendments they wanted.

Trump announced via Twitter in July that transgender troops would no longer be allowed to serve in the military. And last month, Defense Secretary Jim Mattis announced he would conduct a six-month review of transgender troops before implementing that order. For now, transgender troops currently in the military are being allowed to reenlist, according to new Pentagon guidelines reported Friday by the Associated Press.

Under Trump's plan, Mattis has until Feb. 1 to finish his study. But the Senate's bill would speed up Mattis's timeline to the end of the year, prevent the military from discharging currently-serving transgender troops, and express Congress' conviction that qualified individuals should be allowed to serve regardless of gender identity.

Despite McCain's and Reed's support, it is not clear whether the bill will get a full Senate vote in the next several months.

Gillibrand and Collins had hoped to attach an amendment to that National Defense Authorization Act pushing back against the transgender troops ban. But their efforts fell short when the Senate could not agree on a roster of amendments to vote on, so they redrafted the amendment as a separate piece of legislation.

The defense appropriations bill is one of the few so-called "must-pass" measures that Congress grapples with each year, and thus is a popular vehicle for lawmakers who might otherwise have difficulty securing debate time for their preferred measures. In the next several months, Congress must tackle budget matters, a looming debt ceiling, immigration and several other high-profile issues that could eclipse a bill to ensure the military service of transgender troops.

Still, McCain's endorsement puts some urgency behind the matter, and it signals to both congressional leaders and Mattis that this is not an issue he intends to ignore.

"The Senate Armed Services Committee will review the results of the DOD study on accession," McCain said in his statement, "and will continue to work closely with our military leaders on any policy changes as we conduct oversight on this important issue."