National polls show increasing acceptance of same-sex marriage. Proponents have prevailed in court and recent state legislative battles.

Still, a stubborn fact remains: When the issue has gone before voters — as it will on Tuesday in North Carolina and this fall in as many as four other states, including Maryland — gay rights activists have never won.

Since 1998, voters have gone to the polls 31 times to have their say on statewide ballot measures. Advocates for same-sex marriage have lost every time.

Polls show the epic losing streak is likely to continue with North Carolina’s vote. But gay rights advocates are hopeful that Maryland voters could be among the first to break the streak by affirming same-sex marriage in a November vote.

Given the number of states with upcoming ballot measures, this year is shaping up as “nothing less than a national referendum on the same-sex-marriage issue,” said Brian S. Brown, president of the National Organization for Marriage, a group fighting such nuptials across the country.

Tuesday’s vote in North Carolina will be the first related to the issue since 2009, when 53 percent of voters in Maine rejected a new law that allowed same-sex marriage there. Polls are not very promising for gay rights activists. State law already limits marriage to that between a man and a woman, but the Republican-led legislature is asking voters to write a ban into the constitution.

Gay rights activists are much more hopeful about November, when Maryland and a couple of other more liberal states are expected to ask voters whether same-sex marriage should be allowed.

In Maryland, opponents of such unions are well on their way to collecting the 55,736 signatures required to call a referendum. But Gov. Martin O’Malley (D) has said he is confident that a new law, which will allow same-sex nuptials starting Jan. 1, will be upheld. And perhaps he has reason to be: A Washington Post poll early this year showed that 50 percent of adults voiced support for same-sex marriage and 44 percent opposed it.

Like national surveys, the poll found that backing is strongest among younger residents, suggesting that the trend of growing support is likely to continue in coming years. In fact, a survey last month by the Pew Center’s Forum on Religion and Public Life showed that more Americans favor same-sex marriage than oppose: 47 percent to 43 percent.

And support from once-reticent politicians continues to grow, as evidenced by Vice President Biden’s pronouncement Sunday that he is “comfortable” with same-sex marriage.

“There’s no question that winning a majority vote on minority rights is the last barrier we have to overcome,” said Evan Wolfson, president of Freedom to Marry, a national group involved in several state ballot measures this year. “It’s always very difficult for a minority to turn to the majority and say ‘please stop discriminating’ with an up-or-down vote. But hearts and minds have changed across the country.”

Even in reliably blue states such as Maryland, however, success at the ballot is hardly considered a given this fall.

The bill passed the House of Delegates in February with only one vote to spare. A similar bill died the year before, prompting advocates to urge O’Malley to put the full weight of the governor’s office behind the legislation this year.

Still, the proposal is anathema to many African American lawmakers from Prince George’s County, who cited the influence of black churches in their districts, and with more conservative Democrats from the rural part of the state.

Those divisions are reflected in the voting population as well. African Americans make up a larger share of residents in Maryland than in any state outside the Deep South. The Post poll showed that their opposition to same-sex nuptials at 53 percent to 39 percent.

In a recent column in the Baltimore Sun, former Maryland governor Robert L. Ehrlich Jr. (R) predicted a “decisive defeat,” arguing that “a coalition of Catholics, African Americans, Hispanics and conservatives from both sides of the aisle” will make their voices heard.

Long-serving Maryland Senate President Thomas V. Mike Miller Jr. (D-Calvert), who opposes same-sex marriage, said last week that this could be an issue on which lawmakers are ahead of their constituents.

If voters reject the Maryland law, leading legislators suggest it will probably be 2015 — after the next round of state elections — before the issue is again seriously considered.

Those on both sides of the matter in Maryland have been watching what’s happening in North Carolina, where the fight has brought out some big names and money.

The evangelist Billy Graham, 93, bemoaned the country’s “moral decline” in ads supporting the constitutional amendment. Former president Bill Clinton argued in recorded messages Monday that the “real effect of the law will be to hurt families and drive away jobs.”

A rally in Raleigh on Monday that drew about 100 church pastors, both black and white, underscored the strength of amendment supporters.

The Rev. Patrick L. Wooden Sr., pastor of the Upper Room Church of God in Christ, argued that same-sex nuptials are not the civil rights issue that “demagogues” on the other side have claimed. “I’ve never seen signs that say ‘homosexual water fountains’ or ‘homosexuals go to the back of the bus,’ ” he said. “We believe the God of the Bible got this right.”

Brown, from the National Organization for Marriage, said his group is not ceding ground in Maryland or elsewhere, including Maine, which is holding a rematch on its 2009 ballot measure. He predicted that his side will gain momentum coming out of North Carolina and in November rebut the “elite notion that same-sex marriage is inevitable.”

In Maryland, opponents have to acquire the necessary signatures to force the vote — something even supporters say will happen.

Henrietta Green, who works for the Department of Housing and Urban Development, was among the latest to volunteer as a petition “circulator” during a training session Saturday sponsored by the Maryland Marriage Alliance at the National Church of God in Prince George’s.

“Marriage is between a man and woman, simple as that,” she said when asked what brought her to the training. “The governor or whoever has said what they have to say. Now they need to hear our voices.”

Organizers of the effort to uphold the law are taking nothing for granted in Maryland. In one of a series of ongoing strategy sessions to prepare for the fall, they offered pizza and soda to interested members of the public who turned out at a Rockville temple on a recent night.

Leaders from Marylanders for Marriage Equality showed a video featuring supportive clergy members. They collected donations that will pay for ads and campaign workers. And they emphasized the need to foster thousands of neighbor-to-neighbor conversations to boost their chances of prevailing on the ballot this fall.

“I hope you guys are excited,” Karess Taylor-Hughes, a young gay rights activist who led the discussion, said as the meeting wrapped up. “We’re going to be the first state to get this done.”

Although November is a long way off, the meeting underscored how far activists have to go: Only about 20 people showed up.