A federal judge struck down Idaho's same-sex marriage ban Tuesday, ruling that it violated gay couples' constitutional rights. 

According to Reuters, U.S. Magistrate Judge Candy Dale ruled that it relegated gay couples to a second-class status in the state. The ruling is the latest decision in a series of states' rulings against bans on same-sex marriage. 

The decision will take effect Friday at 9 a.m. local time. 

As of now, gay couples have full marriage rights in 17 states and the District of Columbia.

States have been extending marriage rights to same-sex couples after the U.S. Supreme Court ruled last year that gay couples can have access to the same federal benefits awarded to straight couples. The decision struck down a part of the 1996 Defense of Marriage Act, and has been used as a precedent by state judges to overturn states' bans on same-sex marriage. 

The suit against the ban was brought to Idaho's federal court by two lesbian couples who have out-of-state marriages that were considered invalid in Idaho, and two other gay couples who are unmarried and want to get married in the state. 

Idaho Governor C.L. "Butch" Otter and Ada County Clerk Chris Rich were both defendants in the case. 

On Tuesday, Otter said that voters "exercised their fundamental right" in 2006 by defining marriage as between one man and one woman. 

"Today's decision, while disappointing, is a small setback in a long-term battle that will end at the U.S. Supreme Court," Otter said in a statement.

The judge found that the state's law discriminated against same-sex couples, and denied claims by the governor that same-sex marriage focuses on the "emotional interests of adults" and not children's welfare. 

Shannon Minter, legal director of the National Center for Lesbian Rights in San Francisco, said that gay couples in the state have waited "decades" to be treated equal to straight couples. 

"This decision means so much to them and to other same-sex couples and families across the state, who have waited for decades to be treated as equal citizens," Minter said.