President Obama’s support for the right of people of the same sex to marry is both a cause and an effect of the movement in the United States to provide full legal equality for people who are gay, lesbian, bisexual or transgender.

Earlier in his career, Barak Obama had already expressed support for equality before the law. As President, he pulled back. People who are surprised by this are apparently surprised that people running for elected office have to take into account the views of the electorate. It does not mean that office-holders or candidates should be ready to adopt whatever positions the public wants. But the notion that public opinion should be completely disregarded by elected officials is both unrealistic and, in its unvarnished version, undemocratic.

While not supporting same-sex marriage until recently, President Obama has throughout his presidency been very supportive of efforts to provide full legal equality for those of us who are discriminated against based on either sexual orientation or gender identity. He signed into law a bill adding these categories to our existing hate crimes law.

President Obama also supported our successful efforts to undo the policy that restricted the right of lesbian, gay, bisexual or transgender people to serve openly in the U.S. military. During that debate, I had the privilege of being able to point to the example of the IDF to refute the notion that failing to discriminate against people who are lesbian, gay, bisexual or transgender would somehow mean an ineffective military. (On that subject, by the way, people should note that in the history of the United States, three heads of state have mentioned gay rights favorably from the rostrum of the U.S. House of Representatives: Bill Clinton, Barack Obama, and Benjamin Netanyahu.)

The President took a major step towards defending peoples’ rights to marry individuals of their own choosing, when he announced that his administration would not defend the constitutionality of the Defense of Marriage Act in court. The Act says that even when a state has recognized same-sex marriages, the federal government must not honor them. The President’s announcement that he opposed this discrimination as unconstitutional was met with very little opposition, and I believe it confirmed to him that, while there still would be many who would be unhappy when he embraced the notion of full legal marriage equality, it would not be a major political drawback.

Now that he has explicitly completed his support for full legal equality, President Obama will be an ally in several critical state referenda that happen this year in which marriage is on the ballot. In particular, in the state of Maryland, which has a large African-American population, it will be very helpful that opponents of same-sex marriage will no longer be able to cite the President as opposing equal marriage but will rather have to acknowledge his support for it.

And this support from the President reinforces my view that we are close to the point when full legal equality will be obtained. This is both because the reality of same-sex marriage in many states has disproven the dire predictions of chaos if it were recognized, and because younger people are increasingly less inclined to think that sexual orientation or gender identity is a reason for discrimination.

Finally, it should be of particular interest to those reading here that Jewish members of the U.S. House of Representatives are the most supportive demographic group in the House for the rights of people to be free of gender or sexual orientation discrimination, bar none. This support includes virtually unanimous opposition from the Jewish members to any effort to restrict the states from recognizing same-sex marriages.

Barney Frank represents the Fourth Congressional District of Massachusetts. He is the Ranking Member of the House Financial Services Committee, having begun his career in the Massachusetts State House, where he served for eight years before winning a seat in the U.S. Congress in 1980.