Hamby said he was "elated" U.S. District Judge Timothy Burgess sided with them, and he planned to be among the first in line to apply for a license Monday.
Another couple, Susan Tow, and her wife, Chris Laborde, were among those who sought to overturn Alaska's ban and celebrated the ruling.
"This is just an amazing day for Alaska," Tow said. "We're just so fortunate that so many have fought for equality for so long I mean, decades."
The state will begin accepting applications Monday morning, Phillip Mitchell, with the state Department of Vital Statistics, told The Associated Press in an email. Alaska has a three-day waiting period between applications and marriage ceremonies.
Last week, the U.S. Supreme Court declined to hear appeals from Utah and several other states seeking to retain their bans on same-sex marriage. The Oct. 6 move effectively legalized gay marriage in about 30 states. But much of last week was marked by confusion as lower courts and states worked through when weddings could begin.
Then, the 9th U.S. Circuit Court of Appeals in San Francisco overturned marriage bans in Nevada and Idaho on Tuesday. On Thursday, West Virginia officials began issuing gay marriage licenses, and Kansas' most populous county issued a marriage license Friday to a gay couple, believed to be the first such license in the state.
Sunday's ruling in Alaska came in a lawsuit brought by five gay couples who asked the state in May to overturn a constitutional amendment approved by voters in 1998, the same year Hawaii passed its ban but a state that later legalized the unions. The Alaska amendment defined marriage as being between one man and one woman.
The lawsuit sought to bar enforcement of the ban or any state laws that refuse to recognize gay marriages legally performed in other states and countries or that prevent unmarried gay couples from marrying.
The judge heard arguments Friday and released his 25-page decision Sunday. Burgess said the laws violated gay couples' due process and equal protection rights.
"Refusing the rights and responsibilities afforded by legal marriage sends the public a government-sponsored message that same-sex couples and their familial relationships do not warrant the status, benefits and dignity given to couples of the opposite sex," Burgess wrote.
Gov. Sean Parnell said in a statement Sunday that he would appeal in order to defend the Alaska Constitution.
"Although the district court today may have been bound by the recent 9th Circuit panel opinion, the status of that opinion and the law in general in this area is in flux," he said.
State lawyers were reviewing Burgess' decision and working on the next steps to appeal.
Joshua Decker, the executive director of the American Civil Liberties Union of Alaska, said the state has no legal chance of prevailing at either the 9th Circuit appeals court or with the U.S. Supreme Court.
"It's really unfortunate the governor wants to continue to swim against the tide of history and try to perpetuate discrimination against Alaskans," Decker said. "We're disappointed but that's not going to dampen our elation."
Hamby said the appeal was "ridiculous and futile." He also called it misguided "because it continues to injure same-sex couples who love each other and just want to get married."
If the state does appeal to the 9th Circuit, chances of winning were slim since the federal appeals court already ruled against Idaho and Nevada, which made similar arguments.
In the past year, the U.S. Supreme Court has struck down a provision of the federal Defense of Marriage Act that prevented legally married same-sex couples from receiving a range of federal benefits. Federal courts also have since struck down state constitutional bans in a number of states.
Tow, one of the plaintiffs, said she was happy for the children of Alaska gay couples who will now see their parents recognized.
"We never thought we'd see this in our lives," she said.