President Barack Obama on Tuesday called on Maryland voters to oppose a proposed referendum which seeks to repeal the state's gay marriage law.

Maryland lawmakers approved and Governor Martin O'Malley signed a measure legalizing gay marriage earlier this year. The law won't take effect until January 1, 2013, giving opponents sufficient time to attempt to repeal the law at the ballot box in November.

“We're moving forward to a country where we treat everybody fairly and everybody equally, with dignity and respect,” gay weekly the Washington Blade quoted Obama as saying during a campaign fundraiser at the Hyatt Regency in Baltimore. “And here in Maryland, thanks to the leadership of committed citizens and Gov. O'Malley, you have a chance to reaffirm that principle in the voting booth in November. It's the right thing to do.”

While it is not the first time the president has called for the defeat of a gay marriage ban, it is only the second time since he endorsed gay marriage that he has made such an endorsement in person. During a campaign stop last month in Seattle, the president made a more oblique reference to that state's November referendum.

(Related: Washington gay marriage ban Referendum 74 qualifies for ballot.)

Josh Levin, campaign director for Marylanders for Marriage Equality, said the group was “grateful the president highlighted the marriage referendum in his remarks today.”

“Voters identify with his journey on the issue and are re-thinking their own position on same-sex marriage. A strong majority already realize this is about treating gays and lesbian fairly under the law and about dignity for all Maryland families, not just some families. The president's history-making leadership on marriage equality has inspired new conversations around kitchen tables and in church pews, not just in Maryland but all over the country.”