Mayor Michael R. Bloomberg, in a commencement address at the University of North Carolina at Chapel Hill on Sunday, delivered a spirited defense of the right of gays and lesbians to marry, just days after North Carolina passed an amendment that banned the practice.



“Each and every generation has removed some barrier to full participation in the American dream,” the mayor said. “I would argue last week’s referendum banning same-sex marriage shows just how much more work needs to be done to ensure freedom and equality for all people.”

Mr. Bloomberg has become a vocal supporter of same-sex marriage, which was legalized by the New York State Legislature last year, and he chairs a group, “Mayors for the Freedom to Marry,” that supports “ending marriage discrimination at all levels of government.”

Mr. Bloomberg’s commencement speech – which had been scheduled months in advance – allowed the mayor an opportunity to weigh in on an issue that dominated the national conversation last week, as President Obama announced that he believed same-sex couples should be allowed to marry.

Mr. Bloomberg, in his remarks to about 5,700 graduating students at the university’s main campus in Chapel Hill, said, “More than any other generation that has walked the Earth, you are free to pursue your dreams – unbounded by limits placed on your race, gender, ethnicity, orientation, or lineage.”

He added, “I have no doubt that in your lifetime, liberty’s light will allow us to see more clearly the truth of our nation’s founding principles, and allow us to see all people, and all couples, as full and equal members of the American family.”

The mayor’s remarks about same-sex marriage came early in his speech, as he urged students to reflect on the evolution of the freedoms they are afforded in the United States.

“If government can deny freedom to one, it can deny freedom to all,” the mayor said. “Exclusion and equality are mortal enemies – and in America, every time they have met in battle, equality has ultimately triumphed.”

“The work is not over. Far from it,” the mayor added, before he offered his implicit disapproval of the outcome of last week’s state referendum.

Mr. Bloomberg’s comments found a receptive audience on the campus, which had held multiple rallies against the amendment during the campaign, and which is located in one of a handful of counties that voted against it.

When Mr. Bloomberg spoke in support of same-sex marriage, he was greeted with the loudest applause of the morning, from students and administrators, including the school’s chancellor, Holden Thorp.

“I think it’s just because everyone here [in Chapel Hill] is so against it,”said John Gillespie, a graduating student from Pinehurst, N.C.

And Chelsea Pickett, a graduating student from Fayetteville, N.C., said, “We’re on the same page, so I agreed. We as a state have a long way to go.”

In his address, Mr. Bloomberg also paid notice to the uncertainty of life after graduation, allowing a wry reference to the possibilities offered by politics.

“The girl behind you could be a future president of the United States,” Mr. Bloomberg told the students. “Or even, better than that, the mayor of New York City!”

Steven Norton contributed reporting from Chapel Hill.