Gay marriage celebrates its 7th anniversary in Massachusetts on Tuesday.

It was on May 17, 2004 that celebrations erupted in town halls across Massachusetts as the first gay and lesbian couples legally exchanged vows after the state Supreme Court ruled a gay marriage ban unconstitutional. The scenes were cheerful as hundreds of well wishers rushed to witness history unfold before their eyes.

Since then, the state has issued thousands of marriage licenses to gay and lesbian couples.

In Provincetown, the gay mecca of New England, the legalization of gay marriage has created a booming gay wedding cottage industry.

But there have been rocky moments along the way. Years of hand wringing followed the court's decision as gay marriage foes fought to amend the state Constitution to re-ban gay marriage. In 2007, lawmakers decided to abandon the effort as support for the institution grew.

The next year, lawmakers paved over an obscure 1913 law that banned non-residents from marrying in the state if the marriage was not recognized in their home state.

Arline Isaacson, co-chair of the Massachusetts Gay & Lesbian Political Caucus and an architect of gay marriage in Massachusetts, said supporters won marriage equality by outflanking opponents.

“In order to win the right for gay people to marry it takes a number of variables that include working very, very hard but as importantly, working smart,” Isaacson said on the gay rights website “It means trying to think like the enemy. Trying to think like our opponents.”

“That's one of the things we did so well in Massachusetts and it made all the difference in the world. We quite literally in Massachusetts out-lobbied our opponents, out-maneuvered our opponents, out-parliamentary procedured our opponents and out-organized our opponents every step of the way.”

In addition to Massachusetts, four states – Connecticut, Vermont, New Hampshire and Iowa – and the District of Columbia have legalized gay marriage. Several states, including California, New Jersey, Washington, Hawaii, Illinois, Oregon and Delaware, grant gay and lesbian couples all the legal protections of marriage through civil unions or domestic partnerships.