A majority (albeit a slight 52 percent) of Americans say they would support a law that legalizes same-sex marriage in all 50 states, according to a new Gallup poll.

The survey comes weeks after the U.S. Supreme Court struck down the Defense of Marriage Act, or DOMA, allowing for gay couples to get federal benefits in states that recognize these marriages.

The biggest supporters of gay marriage in the Gallup survey are liberals (77 percent), those with no religious affiliation (76 percent), Democrats (70 percent), and young voters 18 to 34 years (69 percent). At the opposite end, weekly churchgoers (73 percent), conservatives (67 percent), Republicans (66 percent) and those 55 and older (58 percent) would vote against a law that makes same-sex marriages legal across America.

Gallup surveyed 2,027 people between July 10 and 14 for this poll.

Over the years, support for gay marriage has been steadily increasing, going from a low 37 percent between 2005 and 2006 to 54 percent of public thinking it should be recognized as valid, according to Gallup data.