(Bloomberg) -- New Hampshire lawmakers passed a bill today to make their state the fourth in the U.S. to grant same-sex couples the right to enter into civil unions.

Governor John Lynch, a Democrat, said today he would sign the measure, according to his spokesman Colin Manning.

"This legislation is a matter of fairness and conscience and it is in keeping with the state's proud tradition of preventing discrimination," the governor said in a statement.

A civil union law would give homosexual couples the same rights as married people, such as hospital visitation rights, said Senate President Sylvia Larsen, a Democrat from Concord. It would also give people in the relationships rights that aren't guaranteed now, she said.

"This is the right thing to do," Larsen said in a statement. "This is not a state that believes in discrimination."

The Senate voted 14-10 for the bill, with 14 Democrats in favor and 10 Republicans against. The Democratic-controlled House of Representatives passed the measure April 4 by a 243-129 vote.

Since 2000, Vermont, Connecticut and New Jersey have passed laws recognizing civil unions between same-sex partners. Same-sex marriage is legal in Massachusetts as a result of a state court ruling. The federal government doesn't recognize state-sanctioned civil unions.