The Trump administration's ban on transgender troops takes effect Friday, nearly two years after President Donald Trump first tweeted about it.

The new policy rolls back an Obama-era policy. Under the new policy, most transgender individuals will not be allowed to serve in the military, though current service members will be grandfathered in, allowing them to serve openly.

In 2017, Trump tweeted that the military “will not accept or allow transgender individuals to serve in any capacity.” Trump later said that he was doing the military “a great favor.”

Opponents of the ban filed a string of lawsuits, blocking implementation of the policy. But in January, the Supreme Court agreed to allow the ban to go into effect as the cases move forward.

On the eve of implementation, LGBT rights groups denounced the ban.

“At this difficult moment for transgender service members and those wishing to serve their country, every transgender patriot should know that a grateful nation supports you,” said HRC National Press Secretary Sarah McBride. “The Trump-Pence transgender troop ban is dangerous for both transgender people and our national security, which is why a bipartisan chorus of members of Congress, leading military experts and overwhelming majorities of Americans oppose this despicable policy. The fact that a service member who came out on Thursday can continue to serve openly while a service member who comes out on Monday can’t only reinforces the cruel and arbitrary nature of this ban.”

“This is a dark day for our nation's military and the more than 13,000 brave transgender service members who are putting their lives on the line to protect the freedoms we hold so dear. It's morally wrong, it's unpatriotic, and make no mistake - it's not just discriminatory, it is damaging. It compromises readiness, good order, and discipline in our armed forces.” said Sarah Kate Ellis, president and CEO of GLAAD.

“This systematic erasure by President Trump and his administration is a national disgrace, and we will not be silent, nor will we forget. Equality and acceptance are only made possible when we speak up and fight back. We will continue to do just that, no matter who is in the White House. And we will reverse this discriminatory attack on our military,” she said.

According to the Pentagon, roughly 9,000 service members self-identify as transgender.