By Patricia Zengerle
WASHINGTON (Reuters) - President Barack Obama on Wednesday praised New York's move to legalize same-sex marriage but stopped short of endorsing it himself, maintaining a stance that has frustrated many liberal supporters.
"What I've seen happen over the last several years, and what happened in New York last week, I think, was a good thing," he told a new conference.
New York became the most populous state to allow gay marriage on June 24, in a high-profile victory for gay rights activists ahead of the 2012 presidential and congressional elections.
But Obama held to his cautious line on an issue that could alienate social conservatives as he runs for re-election next year, saying the marriage issue is a matter that should be decided by the states, not the federal government.
"Each community is going to be different and each state's going to be different," Obama said.
Obama, who backs civil unions for same-sex couples, would not say whether he personally supports same-sex marriage.
"I'm not going to make news on that today," he said.
Gay and lesbian voters supported Obama strongly as he ran for the White House in 2008 and he will need their support as he runs again this time, even as he seeks to shore up his support among more centrist independent voters whose support is essential in a presidential race.
Obama has stressed that he has helped advance some gay issues, including winning repeal of the ban on gays serving openly in the military and his order for the U.S. Department of Justice to stop defending a law banning gay marriage.
"This administration, under my direction, has consistently said, 'We cannot discriminate as a country against people on the basis of sexual orientation,'" Obama said. "And we have done more in the two and half years that I been in here than the previous 43 presidents to uphold that principle."
Some liberals have attacked Obama because he has not taken a stronger stand on the marriage issue.
He said on Wednesday that he saw a "profound recognition" that gay men, lesbians and transgender people should be treated just like other Americans and that the country was moving in that direction, although the process will not be smooth.
"It turns out that the president -- I discovered since I've been in this office -- can't dictate precisely how this process moves. But I think we're moving in a direction of greater equality, and -- and I think that's a good thing," Obama said.
The U.S. public is nearly evenly split over whether gays and lesbians should be able to marry legally, with 45 percent in favor and 46 percent opposed, according to a Pew research poll released last month.
(Editing by Cynthia Osterman)