You’d have thought we were a bunch of fags,” the first sergeant in my reserve unit recounted, while regaling a small group of soldiers with a story of a frigid night spent huddling for warmth while bivouacking. “Yeah, that sounds gay,” another chimed in, to laughter. I cringed and kept my face from betraying the embarrassment and anger I felt internally.

Those were the first slurs I had heard since returning to the military as a reservist six years after I was honorably discharged from the Army in 2009 under “Don’t Ask, Don’t Tell” (DADT).

The next day, the company commander—a highly regarded young captain whom I’d come out to upon my arrival to the unit—pulled me aside.

“I wanted you to know that I spoke with the first sergeant,” he said. “I let him know that would be the last time I’d ever hear jokes about sexual orientation from him or anyone in the company.”

Over the next year, the commander kept his word and maintained the kind of respectful culture that advocates for the repeal of DADT argued was possible. Back then, we knew it would fall to commanders to maintain the professionalism that allowed people of all backgrounds to serve together and focus on the mission.

Like the Defense of Marriage Act, DADT was another remnant of the Clinton administration’s lackluster record on LGBTQ rights. The law, enacted in 1994, was intended as a compromise between President Bill Clinton’s campaign promise to end the informal practice of kicking homosexuals out of the military and Republican insistence that our forces weren’t ready for open service.

The compromise meant that gay and lesbian service members would be allowed to serve, assuming they denied who they were and kept their private lives hidden.

In return, the military was supposed to avoid asking about the lives of gay and lesbian troops and end its often-aggressive pursuit of evidence of homosexual conduct. Early versions of the policy were referred to as “Don’t Ask, Don’t Tell, and Don’t Pursue.”

The actual impact of DADT was disastrous. In the military, family and professional life often blur. To keep their lives private, gay and lesbian service members had to lie constantly to keep their identities secret.

Compounding matters, the policy was interpreted differently across the military and implemented inconsistently on a unit-by-unit basis depending on how zealous a commander felt about LGBTQ service.

In response to this, organizations like Service Members Legal Defense Network (SLDN) were formed to advise troops who were under threat of discharge and begin to challenge the law in the courts.

When I graduated from West Point in 2003, I assumed I’d have to give up hope of having a family to maintain a career in the Army. I joined a military struggling to contain an increasingly complex insurgency in Iraq—a country we were told would greet us as liberators and a conflict that was supposed to be resolved in a matter of months. These were quickly proven to be falsehoods, much like the tenuous connection to 9/11 and spurious evidence of weapons of mass destruction.

Over the course of my two deployments to Iraq—a war that I opposed—it became clear that soldiers didn’t care about the sexual orientations of those with whom they served. If you had their back on the battlefield, they didn’t care who you loved at home.

As the wars in Iraq and Afghanistan raged on over the course of the decade, the loss of skilled troops—particularly linguists, pilots, and doctors—began to strain a fighting force struggling to meet recruiting targets.

Over the life of DADT, more than 13,000 service members were discharged, many of them with less than honorable discharges.

By the mid-2000s, national polling showed increasing numbers of Americans accepted the idea of open service. DADT repeal advocates sensed a strategic opportunity, and the election of President Obama in 2008 meant it was time to strike.

Members of the military community like Dan Choi, Zoe Dunning, Victor Fehrenbach, Katie Miller, Mike Almy, and others began to speak out and demand a change to the policy. Straight allies like Adm. Mike Mullen provided invaluable testimonies. Thousands of other LGBTQ troops did their part by serving honorably at great personal sacrifice to help prove the point that the ban served no valid military purpose.

The strategy adopted by organizations like SLDN, Outserve, Lambda Legal, and the Human Rights Campaign sought to press the administration and members of Congress to act. Some organizations urged more aggressive action to hasten change.

Throughout the fight, repeal advocates also recognized the importance of open service to the broader fight for equality. It would force Americans to confront an ugly truth. They were asking LGBTQ troops to risk their lives for a country that denied them the right to marry or freedom from discrimination in the workplace.

Though reluctant initially, the Obama administration agreed to a phased repeal of DADT. In 2010, repeal passed narrowly just before Democrats lost their House majority, and open service took place with no negative consequences.

The repeal movement failed, however, in its mission to secure the right to open service for transgender troops. The Obama administration later tried to ameliorate this through regulatory change, but transgender patriots are now under attack by the Trump administration, which cites the same flawed concerns about “cohesion” that were discredited by the DADT repeal—and nearly three years of open service by trans troops. Trump’s trans military ban is particularly cruel, because the military is the single largest employer of trans individuals in the United States, with an estimated 15,000 active-duty personnel.

We’ve come a long way—far enough for what was once a common slur to now trigger a stern reprimand. But any attack on transgender service proves we still have a fight on our hands. We must stay vigilant and keep improving.