CONCORD, N.H. (AP) — New Hampshire legislators have approved a measure that would make the state the sixth to allow gay marriage.

Gov. John Lynch is expected to sign the legislation Wednesday afternoon.

He had promised a veto if the law didn’t clearly spell out that churches and religious groups would not be forced to officiate at gay marriages or provide other services.

The Senate passed the measure Wednesday, and the House followed later in the day. The House vote was 198-176.

Massachusetts, Connecticut, Maine, Vermont and Iowa already allow gay marriage. Maine opponents hope to overturn that state’s law with a public vote.