Gay couples from across America are one step closer to a Massachusetts wedding.

The Massachusetts Senate voted Tuesday to repeal a 1913 law used to bar out-of-state gay couples from marrying here. The law prohibits couples from obtaining marriage licenses if they could not legally wed in their home states.

After Massachusetts became the first state to allow gay marriages in 2004, then-Gov. Mitt Romney ordered town clerks to enforce the little-known law and deny licenses to out of state couples.

Critics, including Democratic Gov. Deval Patrick, the state's first black governor, said the 95-year-old statute carries a racist taint and needs to be repealed.

The law dates to a time when the majority of states still outlawed interracial marriages. Opponents said the law was designed to smooth relations with those states. Massachusetts has allowed interracial marriages since 1843.

Dianne Wilkerson, the Massachusetts Senate's lone black member, said the vote was long overdue to kill the law, which she called "evil."

"This is one of the most pernicious statutes on our books," said Wilkerson. "In some respects this bill puts the final nail in the coffin of those dark days."

The bill passed on a voice vote.

Opponents of gay marriage said there's no evidence the 1913 law has a racist heritage. They said keeping the law in place is key to preventing gay marriage from spreading to other states, many of which have passed laws or amended their constitution to bar same-sex marriage.

"The Massachusetts Senate has no right to infringe on the internal issues of how other states define marriage, but that's exactly what they voted today to do," said Kris Mineau, president of Massachusetts Family Institute.

The House is also expected to vote on the repeal later this week.

An analysis released by the state Office of Housing and Economic Development found repealing the law would draw thousands of couples to Massachusetts, boosting the economy by $111 million, creating 330 jobs and generating $5 million in taxes and fees over three years.

The study assumes New York would provide the largest number of gay couples — more than 21,000 couples — with New Hampshire, New Jersey, Connecticut, Vermont, and Maine bringing the total to more than 30,000 in the first three years after the ban was lifted.

Another factor driving the repeal effort in Massachusetts is California's recent embrace of same-sex marriage.

California has no residency requirement to obtain a marriage license.