SIOUX FALLS, S.D. (AP) — A federal judge on Monday declared South Dakota’s same-sex marriage ban unconstitutional, but stayed the decision pending appeal.

U.S. District Judge Karen Schreier issued a summary judgment in favor of the six couples who filed the lawsuit last year in Sioux Falls. The federal complaint challenges a 1996 law passed by the Legislature and a voter-approved 2006 constitutional amendment banning gay marriage, which means such cases are now pending in 30 states with gay marriage bans.

The lawsuit also challenges a U.S. provision allowing states not to recognize same-sex marriages performed elsewhere.

The couples’ attorney, Josh Newville, on Monday said he looks forward to “calling his clients and informing them of the news.”

A spokeswoman for South Dakota Attorney General Marty Jackley didn’t immediately return a call seeking comment. Jackley has said he’s obligated by law to defend both the state constitution and state statutes. He’s among the defendants that also include Gov. Dennis Daugaard, Public Safety Secretary Trevor Jones, Pennington County Register of Deeds Donna Mayer and Brown County Register of Deeds Carol Sherman.

Five of the couples already got married in Iowa, Connecticut and Minnesota. Nancy Rosenbrahn, of Rapid City, married her longtime partner in April in Minneapolis.

(© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)