A bill which would make New Jersey the seventh state to legalize gay marriage cleared an Assembly panel on Thursday.

The Assembly Judiciary Committee approved the measure with a 5 to 2 party-line vote after hearing more than 6 hours of testimony from dozens of supporters and opponents. Republican Assemblyman Michael Patrick Carroll said he could not support the measure because it would not benefit society.

In 2009, Carroll created controversy when he said gay relationships are of no “societal consequence.”

The move comes a week after the Democrat-controlled Senate Judiciary Committee approved and forwarded the measure to the full Senate.

Opposition to the bill came mostly from religious groups.

An exchange between Chairman Peter J. Barnes and Greg Quinlan, the president of Parents and Friends of Ex-Gays & Gays (PFOX), a group that claims homosexuality can and should be altered, became heated when Quinlan demanded an apology from lawmakers for calling opponents “bigots.”

However, the hearing also included many people of various faiths testifying in favor of marriage equality.

(Related: Girl calls on New Jersey lawmakers to let her gay dads marry.)

Last week, Republican Governor Chris Christie pledged to veto the bill if it reached his desk and called on lawmakers to let voters decide the issue.

Assemblyman Reed Gusciora, a Democrat and a co-sponsor of the bill, said the measure remains 5 votes shy of passage in the Assembly.