Maine made history Tuesday with the first-ever legalization of same-sex marriage by a popular vote.

Only three years after a losing a people’s veto referendum by a six-point spread, supporters of same-sex marriage flipped the results this time with an identical 53 percent to 47 percent margin of victory.

The people whose hearts had been broken on election night 2009 are now celebrating and making wedding plans.

Credit goes to the supporters who learned from their defeat and made a concerted effort to win votes outside the state’s progressive urban and suburban districts.

They did this by knocking on thousands of doors and engaging thousands of Mainers in one-on-one conversations.

They also ran an effective media campaign that framed the issue as one of basic fairness. Families led by same-sex couples were shown to be people who want the same things that all families want, and who deserve the same legal rights and protections.

As strong as this campaign was, however, something else was at play here. Maine made history, but historical forces also made Maine’s same-sex marriage victory possible.

In 32 tries before Tuesday, no state’s voters had ever extended marriage rights to same-sex couples. Shortly after the Maine results were announced, however, Maryland voters did the same and Minnestota voters knocked down a constitutional amendment that bans same-sex marriage.

Election officials in Washington state still were counting votes on Wednesday, but its referendum legalizing same-sex marriage also appeared headed for passage.

Polling has shown that younger voters do not have the same prejudices about homosexuality that many of their parents and grandparents held. For many young people, being gay is like being left-handed, an innate trait that makes a difference in some individuals’ lives but has no impact on anyone else.

These referendum votes should not be seen as just a demographic takeover. This is one of those rare issues in our politics that does not break along hard partisan divides and where people actually have changed their minds over time.

As gay marriages occur and the nightmare results conjured by opponents fail to materialize, people will wonder what all the fuss was about.

Progress can be slow and painful, but, after a long struggle, the change can come suddenly.

We hope that we are experiencing such a moment now, and members of all families can worry about caring for each other without worrying about unequal treatment under the law.