This file photo taken on July 26, 2017 shows protesters gathering in front of the White House in Washington, D.C. (Paul J. Richards/AFP/Getty Images)

A bipartisan group of lawmakers introduced legislation on Thursday that would allow transgender people to serve openly in the military, after the Supreme Court last month moved to allow President Trump’s transgender troop ban to go into effect.

The legislation was introduced by Sens. Kirsten Gillibrand (D-N.Y.), Susan Collins (R-Maine) and Jack Reed (D-R.I.) in the Senate and Reps. Jackie Speier (D-Calif.), Joseph Kennedy III (D-Mass.), John Katko (R-N.Y.), Susan Davis (D-Calif.) and Anthony Brown (D-Md.) in the House.

It would prohibit the Defense Department from denying the enlistment or continued service of transgender people solely on the basis of their gender identity.

Transgender rights advocates hailed the legislation as a step toward ensuring the equal treatment of transgender service members.

“The bills introduced today affirm that anyone who meets military standards should be able to serve their country. We appreciate that leaders in Congress are stepping in to protect our troops and work for a solution at the same time our legal fight for the rights of transgender service members continues,” Jennifer Levi, the director of the GLBTQ Legal Advocates & Defenders’ Transgender Rights Project, said in a statement.

In July 2017, Trump abruptly announced in a tweet he would ban transgender people from serving in the military, a move that reversed an Obama administration rule allowing transgender troops to serve openly.

Several lower courts have blocked the Trump administration’s policy. Last month, the Supreme Court allowed Trump’s restrictions to go into effect, even as the legal battle continues to make its way through the courts.