New Hampshire legalized same-sex marriage as of Jan. 1, 2010, but a federal mandate still defined marriage as being between a man and a woman.

A Supreme Court decision Wednesday changed that.

"It's a great day for equality and beginning of the end of official discrimination against gay and lesbian people," the New Hampshire Civil Liberties Union said in a post on its website.

The first of the court's two rulings Wednesday overturned the Defense of Marriage Act, which defined marriage as only between a man and a woman and denied federal benefits to same-sex couples. The justices ruled that the 1996 statute violated the Fifth Amendment protections under the Constitution.

"While I believe in traditional marriage, I respect that the Supreme Court is the ultimate arbiter of the constitutionality of our nation's laws," U.S. Sen. Kelly Ayotte said in a written statement. "Ultimately, I do think that states should define marriage and the court's decision preserves states' rights to do so."

The other decision Wednesday was less sweeping, but still a victory to gay marriage proponents who challenged California state law banning gay marriage. The Proposition 8 law was enacted in 2008 and contested the following year. A judge struck down Proposition 8; subsequent appeals took the matter to the Supreme Court.

Justices did not address the law itself, instead ruling that supporters did not have legal standing to appeal a federal district court ruling that struck down Proposition 8. The lower court ruling stands, opening California again to same-sex marriages.

"Today the court sided with freedom over discrimination," U.S. Sen. Jeanne Shaheen said in a statement.

Gov. Maggie Hassan described the Supreme Court decisions as an "historic step forward" in a news release Wednesday.

"Now, for the first time, all married couples, no matter their gender, will receive the fair and equal treatment under the law that they so rightly deserve," Hassan said.

Hassan was the majority leader in the New Hampshire Senate when lawmakers passed the same-sex marriage act in 2009, replacing earlier legislation that allowed couples to receive joint benefits through civil unions.

Former state Rep. Jim Splaine of Portsmouth sponsored both measures with the intention of starting dialogue that could eventually lead to change. While New Hampshire wasn't the first to get such laws on the books, Splaine said it was the first to do it without being driven by the courts or threats of legal action.

"I like to say we did it the New Hampshire way. We should be proud of it," Splaine said. "This is not just about benefits. It's about having marriage between two caring people who want to show their love for each other."

Splaine said the progress has been rapid and significant, but he knows there will always be opposition. An effort to repeal the 2010 same-sex marriage law failed last year in the Legislature.

Ashley Pratte, executive director of the conservative group Cornerstone Action, called the rulings "disappointing," but said the Supreme Court's maneuver around Proposition 8 allows the issue to be decided on a state-by-state basis.

"There are many states that recognize the traditional definition of marriage and they reserve and retain that right to define marriage how they want," Pratte said.