BOSTON — Massachusetts may have been the first state to legalize same-sex marriage for its residents, but when California last month invited out-of-state gay and lesbian couples to get married, the potential economic benefits did not go unnoticed here. Now Massachusetts wants to extend the same invitation.

On Tuesday, the State Senate voted to repeal a 1913 law that prevents Massachusetts from marrying out-of-state couples if their marriages would not be legal in their home states. The repeal, which passed with no objections on a voice vote, is expected to pass the House later this week. Gov. Deval Patrick, a Democrat and a supporter of same-sex marriage whose 18-year-old daughter recently disclosed publicly that she is a lesbian, has said he will sign the repeal.

The repeal of the out-of-state marriage ban would come more than four years after Massachusetts became the first state to allow gay men and lesbians to marry, and same-sex marriage advocates said the timing was carefully calculated to catch the prevailing political — and economic — winds.

State officials said they expected a multimillion-dollar benefit in weddings and tourism, especially from people who live in New York. A just-released study commissioned by the State of Massachusetts concludes that in the next three years about 32,200 couples would travel here to get married, creating 330 permanent jobs and adding $111 million to the economy, not including spending by wedding guests and tourist activities the weddings might generate.