The next crucial debate over President Trump's order to roll back open transgender military service could play out in the Senate when lawmakers return next week from summer recess.

The chamber is set to consider its version of the National Defense Authorization Act, the annual bill that sets military policies. Two senators, Kirsten Gillibrand, D-N.Y., and Susan Collins, R-Maine, have already filed a proposed amendment to the bill that could jam a wrench into the president's plans.

It would bar the Pentagon from kicking out any transgender troops or rescinding their medical benefits until the military finished a study on recruitment and reported back to Congress.

The idea has support from Sen. John McCain, R-Ariz., the Armed Services chairman, who will help decide which proposed NDAA amendments will be approved for a vote on the Senate floor.

"The Pentagon's ongoing study on this issue should be completed before any decisions are made with regard to accession," McCain said last week after Trump issued formal orders to the Pentagon.

McCain called the president's new transgender policy a "step in the wrong direction" and said troops should not be forced from the service based on their gender identity.

Trump on Friday ordered the Pentagon to halt plans to begin transgender recruiting in January and to end "sex‑reassignment surgical procedures" for those troops by March. The memorandum gave Defense Secretary Jim Mattis the task of deciding how to handle currently serving transgender troops who voluntarily identified themselves after the Pentagon allowed open service more than a year ago.

"We'll provide interim guidance to the services in the coming days and then in the coming months in accordance with the president's timeline we'll provide an implementation plan," Pentagon spokesman Col. Rob Manning said on Monday.

Gillibrand was reaching out to fellow senators this week about legislation that would allow transgender troops to continue serving, according to an aide, and more proposals related to transgender military could be coming.

The Senate will resume filing new amendments to the NDAA when it goes back into session on Sept. 5, a committee aide said. The House debated amendments and passed its version of the policy bill in July.

However, any effort to block changes to transgender personnel policy with the Senate NDAA faces a long political road.

An amendment would first need to make the cut and be approved for a Senate floor vote. If passed and added to the NDAA, it would then need to survive conference negotiations between the Senate and House Armed Services committees as they hashed out a final version of the bill later this year.

Ultimately, the NDAA must be signed by Trump, who has the option to veto it.

The massive defense policy bill could be one of the most likely vehicles for Congress to weigh in on the debate. The military's Don't Ask, Don't Tell policy barring gay troops from serving openly was passed as part of the bill in 1993 and was not repealed until 2011.