A number of other US states are considering laws to allow gay marriage
The governor of New Hampshire has signed legislation making the US state the sixth to allow same-sex marriage.
John Lynch was surrounded by cheering supporters as he signed the three bills shortly after a key vote by both houses of the New Hampshire legislature.
Massachusetts, Connecticut, Maine, Vermont and Iowa already allow same-sex marriage.
An earlier bill was rejected after Governor Lynch added protections for religious groups.
Gay marriage is a controversial issue in the US.
Many states have passed laws banning it.
But in north-eastern US states, support for gay marriage has recently begun to gain momentum.
After a 2003 court ruling, gay marriage became legal in New Hampshire's neighbouring state of Massachusetts.
A court ruling was also the trigger for the legalisation of same-sex marriage in Connecticut.
But in the other New England states of Vermont and Maine, gay marriage was legalised after bills were passed in the states' legislatures.
Legislation to allow same-sex marriage is currently being considered in New York and New Jersey.