Joseph Vitale (back) and his husband Robert Talmas (left) play with their adopted son Cooper near their New York City apartment March 9, 2015. A judge in Mississippi struck down a ban preventing same-sex couples from adopting Thursday. Reuters/Mike Segar

In a victory for LGBT rights activists, a federal judge in Mississippi struck down Thursday a ban preventing same-sex couples from adopting children.

U.S. District Judge Daniel Jordan of the Southern District of Mississippi said in a preliminary injunction that the ban stemming from a 2000 statute was unconstitutional and the Department of Human Services in Mississippi should stop enforcing it. Same-sex couples had sued the state over its practices, the Associated Press reported. Jordan said the state’s attorney offered a “tepid” defense.

“We are obviously thrilled with today’s ruling, but our clients are beyond ecstatic,” Roberta Kaplan, a lead attorney in the case for the activist group Campaign for Southern Equality, told NBC News. “Two sets of our clients have waited many [almost nine and 16] years to become legal parents to the children they have loved and cared for since birth. We hope that it should finally be clear that discrimination against gay people simply because they are gay violates the Constitution in all 50 states, including Mississippi.”

After the Supreme Court ruling legalizing same-sex marriage last year, Mississippi was the only remaining state that had a statute banning same-sex couples from adopting children.

“While it may be hard to discern a precise test, the court extended its holding to marriage-related benefits — which includes the right to adopt,” Jordan wrote in his ruling.

Kathy Garner and her wife Susan Hrostowski sued so Hrostowski would be allowed to legally adopt their 16-year-old son Hudson. The couple was thrilled by the decision and said they planned to file adoption papers as soon as Friday. Their son had a typical teenage response to the situation.

“He said ‘Cool.’ Then he said congratulations. Then he said he was going to take a nap,” Garner told the AP.

Approximately 1,400 children are being raised by same-sex couples in Mississippi, a 2014 study conducted by the University of California, Los Angeles, found.