Updated

Gay couples from outside Massachusetts are now free to marry in the state.

Gov. Deval Patrick signed a bill Thursday repealing a 1913 law that barred couples from marrying in Massachusetts if their union would not be valid in their own states.

Massachusetts has allowed gay marriages since 2004, but the move to repeal the law makes the state equal with California, which recently became the only other state to legalize gay marriage and has no residency requirement.

Out-of-state gay couples can marry as soon as Thursday, since lawmakers included a provision to make the repeal go into effect immediately.

In Massachusetts, there is a standard three-day waiting period after applying for a license, but any couple can petition a court for a waiver -- something gay couples in-state did by the hundreds when the first legal gay marriages in the nation were performed in May 2004.

"We're being recognized as a married couple," said Joy Spring, of Middletown, N.Y., who planned to marry her partner of seven years, Carla Barbano, in Provincetown on Friday.

Their 11-year-old daughter, Lizzy, will exchange rings with the couple at the ceremony.

"It's extremely important. If something happened to one of us she'd always be taken care of," said Spring, who in July 2006 entered a civil union with Barbano in New York.

Patrick, the state's first black governor, said he was proud to supported repeal of the law, which he said had its roots in racism. It was first passed 95 years ago as states tried to prevent interracial marriages.

He said the repeal shows that in Massachusetts, "equal means equal."

"In five years now, ... the sky has not fallen, the earth has not opened to swallow us all up, and more to the point, thousands and thousands of good people -- contributing members of our society -- are able to make free decisions about their personal future, and we ought to seek to affirm that every chance we can," said the governor.

Opponents said repealing the law would make Massachusetts the "Las Vegas of gay marriage" and would infringe on other states' rights to define marriage.

Kris Mineau, president of the Massachusetts Family Institute, has said lawmakers' "arrogance and folly" in repealing the law "are doing terrible harm to marriage laws across the country."

Patrick, whose 18-year-old daughter revealed recently she is a lesbian, said he considered delaying the ceremony so she could attend after work, but had to yield to House and Senate schedules on the final day of the year's legislative session.

Asked if the change might create legal problems for couples returning to states with gay marriage bans, Patrick said: "What we can do is tend our own garden and make sure that it's weeded, and I think we've weeded out a discriminatory law we should have."

Supporters of the repeal said lifting the ban would trigger an economic windfall for the state.

A Patrick administration study estimated that more than 30,000 out-of-state gay couples -- most of them from New York -- will wed in Massachusetts over the next three years. That would boost the state's economy by $111 million and create 330 jobs, the study estimated.

City and town clerks anticipate an uptick in applications in communities bordering Massachusetts, mostly for reasons of convenience.

Anyone wanting to get married must fill out a one-page "intention to marry" form, asking for their contact information and whether they have been married before. The form, used since October 2005, also asks where they currently live and plan to live once married, which has been vehicle by which clerks have previously been able to block out-of-state couples from obtaining a marriage license.

The license is good anywhere in Massachusetts, so an out-of-state gay couple living elsewhere in New York or New England could apply in a border community and then marry anywhere in the state.