President Barack Obama on Thursday threw his support behind ballot measures in Maine, Maryland and Washington state that would legalize same-sex marriage.

Though the president first voiced his general approval for gay marriage in May, he had not previously offered specific endorsements of the three measures.

In each case, the endorsements were issued through the state branches of Obama's re-election campaign.

"While the president does not weigh in on every single ballot measure in every state, the president believes in treating everyone fairly and equally, with dignity and respect," said Paul Bell, the campaign's press secretary in Washington state.

"Washington's same-sex marriage law would treat all Washington couples equally, and that is why the president supports a vote to approve Referendum 74," Bell said.

In Maine, gay-rights supporters put the measure on this year's ballot in hopes of reversing the results of a 2009 referendum in which voters rejected a same-sex marriage law passed by the legislature.

In Maryland and Washington, gay-marriage laws were passed by lawmakers and signed by the governors earlier this year, but opponents collected enough signatures to hold referendums on whether the laws should be upheld or rejected.

Ed Murray, an openly gay state senator in Washington who has been fighting for years to legalize gay marriage, expressed gratitude to Obama.

"When I first began fighting in the legislature for marriage equality ... I would never have dared to dream that a president of the United States would one day step forward at this crucial moment, in the middle of his own close re-election campaign, to offer his support for our efforts," Murray said. "But that is exactly what President Obama done, and it is an example of his courage and leadership."

Murray said his hope was to soon be able to wed his partner of 21 years, and he thanked Obama for "bringing that dream a little closer to reality."

Chip White of Preserve Marriage Washington, which opposes the gay-marriage law, said he was unsurprised by Obama's action.

Story continues

"Until May of this year, the president's position was that marriage is the union of one man and one woman," White said. "No one called him a bigot or said he was unfair for holding that position. And Washingtonians who believe in the traditional definition of marriage as one man and one woman are not bigots."

If any of the measures are approved, it would be the first time that a state legalized same-sex marriage through a popular vote. Thus far, all 32 states voting on gay marriage have rebuffed it, while the six states that have legalized it did so through legislation or court orders.

In all three states voting on the issue on Nov. 6, the outcome is expected to be close, though the polls up to now have given an edge to gay-marriage supporters.

___

Associated Press writer Rachel La Corte in Olympia, Wash., contributed to this report.