This piece is part of a series on Obama’s legacy that The Huffington Post will be publishing over the next week.

WASHINGTON ― No president in history has done more for lesbian, gay, bisexual, transgender and queer rights than Barack Obama.

Obama helped lift the ban on LGBTQ people serving openly in the military, granted federal contractors protections against discrimination on the basis of sexual orientation and gender identity, and put a historic number of LGBTQ people in high-ranking positions. And on his watch, marriage equality became the law of the land.

“He has an epic legacy that ranks right up there with other civil rights chapters and defining attributes of great presidents who have helped move America forward,” said Evan Wolfson, founder of the marriage equality advocacy group Freedom to Marry. “He embraced the cause, he explained the cause and he advanced the cause.”

Obama first made a public statement in favor of marriage equality on May 9, 2012. While he lagged behind many other Democratic politicians in announcing his support, it was still monumental: He was the first sitting president to embrace equality.

His administration had been working toward LGBTQ equality long before that pivotal moment.

In February 2011, then-Attorney General Eric Holder announced that the administration would not defend the Defense of Marriage Act in court. The 1996 law defined marriage as being between one man and one woman, cutting same-sex couples off from federal recognition and benefits even if they were legally married. This system created a patchwork of state laws that meant couples could lose their rights if they moved to another state that didn’t have marriage equality.

The Obama administration’s decision sent a clear message that the political winds were changing on the issue.

Wolfson was one of the activists who had been pushing the administration to start dismantling DOMA on a legal basis from the very beginning. The Obama administration ended up arguing that the marriage equality ban violated the 14th Amendment’s guarantee of equal protection and was thus unconstitutional.

“It was just really striking,” Wolfson said. The administration not only “had the courage to do the right thing on the standard of law, but they also had the integrity and courage to carry that to its next conclusion. ... It was not only a matter of the mechanics of the law. It was also showing the political momentum.”

Labor Secretary Tom Perez, who at that time was the head of the Justice Department’s powerful civil rights division, said the announcement was one of the most memorable moments of his time in the administration, describing it as “one of my proudest days” in a call with Democratic officials last month.

House Republicans took up the role of defending DOMA in court, but on June 26, 2015, a landmark Supreme Court ruling invalidated same-sex marriage bans and made marriage equality the law of the land.

While the country’s highest court has recognized the right to marriage, there is still some cause for concern. President-elect Donald Trump says he doesn’t support marriage equality, but the matter is “settled” at this point and he is “fine” with the Supreme Court’s ruling.

Trump has still, however, surrounded himself with people who have long spoken out against equality, starting with his vice president, Mike Pence.

As governor of Indiana, Pence faced intense national backlash for signing a “religious freedom” law that would have allowed businesses to discriminate against LGBTQ people. As a congressman, Pence was an outspoken opponent of equality.

Rep. Barney Frank (D-Mass.), one of the most prominent LGBTQ politicians in American history and for years the only openly gay member of Congress, said he is not worried that marriage rights will disappear. But he is concerned that Trump’s presidency could roll back other advancements, because he will get to nominate a Supreme Court justice to replace the late Antonin Scalia.

“Trump says Scalia is his model,” Frank said. “Scalia was the most important and explicit homophobe to serve the American government since [Senator] Jesse Helms died, and it was less appropriate for a Supreme Court justice.”

As conservatives saw they were losing the fight on marriage equality, they began pushing so-called religious freedom bills in states, such as the one Pence signed in Indiana. Frank says he worries that Trump’s choice for Scalia’s replacement and potentially other Supreme Court nominees could end up hearing cases related to those bills, which could erode equality in other ways.

“The real fear is that some combination of Trump appointees to the Supreme Court and a congressional vote will empower anybody who disagrees with our rights to say, ‘I’m religiously opposed to them and I don’t have to rent to them, I don’t have to service them, I don’t have to respect their rights,’” Frank said.

The most immediate risk is undoing Obama’s executive actions expanding equality. Trump could easily revoke those orders and direct federal agencies to no longer make LGBTQ protections a priority.

LGBTQ students could also lose the federal government’s support in protecting them from bullying and harassment. U.S. ambassadors may not be allowed to march in pride parades around the world. Transgender individuals may no longer have the federal government pushing for their right to use the public restroom that corresponds with their gender identity. LGBTQ federal contractors could lose their anti-discrimination protections.

House Republicans already tried to repeal the employment executive order, but GOP leaders eventually stopped it amid protests from Democrats.

“They tried to repeal it in the House. They were blocked,” said Frank. “But with Trump in the White House, there’s a likelihood that either he will undo that executive order or the Republicans in Congress will override it.”

There’s also a general concern among civil servants that the federal government will not be as open and accepting a place under Trump.

“Most LGBTQ people I’ve spoken to already feel their career advancements will be put on hold if they are ‘out out’ at this point,” said a Treasury Department employee who is a member of the LGBTQ community.

During his eighth and final pride reception in June, Obama reflected on the progress his administration has made. He said the country “cannot be complacent” and will “go backwards if we don’t work hard.” He reflected on the June 2015 night after the Supreme Court decision, when the White House was lit with rainbow pride lights.

“It was a beacon for people around the world who are still fighting for those rights,” he said. “It was a reminder that when the change we seek comes, and when we move a little bit further on our journey toward equality and justice, we still have a responsibility to reach back and help pull up others who are striving to do the same.”

Want more updates from Amanda Terkel? Sign up for her newsletter, Piping Hot Truth, here.