US President Barack Obama hugs graduate Britney Wilson after he delivered the Commencement Address at Barnard College's graduation ceremony in New York on May 14, 2012. AFP PHOTO/TIMOTHY A. CLARYTIMOTHY A. CLARY/AFP/GettyImages

Photo: Timothy A. Clary, AFP/Getty Images

US President Barack Obama hugs graduate Britney Wilson after he...

Image 2 of 3

US President Barack Obama greets graduate Britney Wilson before making the commencement address at Barnard College on May 14, 2012 in New York. Obama headed to New York to speak at the Barnard College commencement, for an interview on The View and to attend a campaign fundraiser. TOPSHOTS/AFP PHOTO/Mandel NGANMANDEL NGAN/AFP/GettyImages

President Obama on Monday defended his support for same-sex marriage, saying the country has never gone wrong when it "expanded rights and responsibilities to everybody."

"That doesn't weaken families. That strengthens families," he told gay and lesbian supporters and others at a fundraiser hosted by singer Ricky Martin and the LGBT Leadership Council. "It's the right thing to do."

The remarks were his first to such an audience since he announced his personal support for same-sex marriage last week. They came on a day that Obama was making a targeted appeal to three core voting blocs - women, young people, and gays and lesbians. He gave a commencement address to Barnard College, a women's college, and taped an interview on "The View," a popular day-time talk show aimed at women.

Democrats hope Obama's politically risky embrace of gay marriage will re-energize supporters who had been frustrated by his previous assertions that his views on the hot-button social issue were "evolving."

Women, young people and gay voters all made up crucial voting blocs for Obama in the 2008 election. With the president locked in a close race with Republican rival Mitt Romney, his campaign is focused on rallying support among those groups once again.

"At root, so much of this has to do with a belief that not only are we all in this together but all of us are equal in terms of dignity and in terms of respect, and everybody deserves a shot," he told about 200 supporters at the fundraising event.

Obama also called for repealing the Defense of Marriage Act, a federal law that defines marriage as being between a man and a woman. His administration has refused to defend the law in court challenges.

The president's choice of Barnard as his first commencement address of the spring underscored the intense focus both candidates have placed on women. An Associated Press-GfK poll conducted earlier this month showed Obama with a sizable advantage over Romney with women voters, 54 to 39 percent.