It was more than seven years ago when Gerald Bostock joined the gay recreational softball league.

The decision to play in the Hotlanta Softball League would cost him his job in the child welfare services department for Clayton County, Ga., he said. It would leave him without health insurance as he recovered from prostate cancer. And it would launch him on a years-long legal fight that culminated in a landmark ruling Monday from the Supreme Court.

Bostock sat in the den of his Atlanta home as he read the high court’s decision making clear what he and many other Americans believed to be true: LGBTQ employees cannot, under federal law, be fired simply because of their sexuality or gender identity.

“The long, seven-year journey I’ve had, it’s well worth every ache and pain,” Bostock said. “I didn’t ask for this, but it needed to be done.”

In a 6 to 3 ruling on Monday, the Supreme Court decided that Title VII of the Civil Rights Act of 1964, which prohibits discrimination “because of sex,” includes LGBTQ employees.

The ruling focused on three related cases involving employees who said they were fired because of their sexuality or gender identity: Aimee Stephens, a transgender funeral director, Donald Zarda, a gay skydiving instructor, and Bostock, the only plaintiff still alive to see the case’s outcome.

Zarda died in 2014, leaving his sister and partner to advance his case. And last month, after seeing her case argued at the Supreme Court in the fall, Stephens died of kidney failure.

“I truly wish they were here with me,” said Bostock, who said he was honored to meet Stephens and her wife, Donna, in Washington, D.C., along with Zarda’s relatives.

After Monday’s Supreme Court ruling, Bostock, 56, plans to return to a trial court in Georgia to fight his case, after years of legal roadblocks.

Before he was fired in 2013, Bostock had spent a decade working for Clayton County as an advocate for children in the juvenile justice system. He received strong performance evaluations and was placed in charge of the county’s Court Appointed Special Advocates program, according to his petition to the Supreme Court.

After he joined the gay softball league, in early 2013, he was openly criticized by “someone with significant influence in the Clayton County court system,” his petition said. In May 2013, at a meeting with an advisory board for his program, Bostock was disparaged for his sexual orientation and his involvement in the league, according to the petition.

The county accused him of mismanaging public funds, which Bostock denied, calling it a pretext for firing him because of his sexuality. The stated reason for his termination, in June 2013, was “conduct unbecoming of a county employee.”

Bostock ended up switching career paths after he was fired. He moved to Atlanta and found a job at a hospital as a mental health counselor for adults. He also pursued a legal fight, arguing that his termination consisted of discrimination protected under Title VII.

While in the cases of Zarda and Stephens, lower courts delivered rulings in favor of the plaintiffs, a district court ruled that in Bostock’s case, Title VII did not provide protection based on sexual orientation. The ruling was upheld by the U.S. Court of Appeals for the 11th Circuit before Bostock brought his case to the Supreme Court.

Bostock asked the high court to reverse the opinion and “correct the error of the Eleventh Circuit for his sake and the sake of all the gay and lesbian workers across this country,” according to his petition.

On Monday morning, Bostock was on a virtual conference call for his job at an Atlanta hospital when he pulled up SCOTUSblog to check for news, as he often does when Supreme Court rulings are expected.

He was stunned to see his name show up on the page: Bostock v. Clayton County, Ga.

“I honestly think I went into shock,” he said. He immediately told his colleagues he would have to leave the work call while he and others across the country scrambled to try to download the ruling, as the website appeared to be temporarily crashing.

He became emotional as he was finally able the open the first page of the ruling, written by Justice Neil M. Gorsuch. “I let out a big scream,” he said. He hugged his partner, Andy.

He and his family members planned to toast with champagne to celebrate Monday’s ruling, which Bostock hoped would bring “a little bit of sunshine in some dark times.”

Bostock thought about how much work still needed to be done, advancements he hopes to pursue in honor and memory of Stephens and Zarda. Congress has yet to pass the Equality Act, which would enshrine nondiscrimination protections for LGBTQ people in employment, housing, credit, education, public spaces and other realms of American life. The state of Georgia has yet to pass a hate crime law.

But he also thought about how much his life had changed since he first joined the gay recreational softball league, a group of teammates he still considers close friends.

“That was one of the best decisions I have ever made,” Bostock said. “I would not change anything.”