Gov. Phil Murphy on Friday signed a law that would set the minimum age for marriage in New Jersey at 18, in what became a fight over human rights versus religious freedom.

New Jersey is the second state behind Delaware to enact a law requiring youth to wait until they are 18 to get married.

State law had permitted 16- and 17-year-olds to obtain marriage licenses with parental consent. Those under 16 needed both parental consent and approval from a judge.

The new law would require people to wait until age 18 to get a marriage license.

Unchained At Last, a non-profit organization that helps young women and girls leave forced marriages, has testified at committee hearings that teenage marriage associated with some conservative religions is more widespread than people think.

Fraidy Reiss, founder of Unchained At Last, called the new law "a huge victory for girls and women across New Jersey."

"This is such a personal victory for me -- because I'm a forced-marriage survivor, and because I wrote this bill, and because I worked for three years to turn this bill into law," Reiss wrote in an email. "We ended a human-rights abuse that destroys girls' lives."

State Health Department data says 3,628 minors got married in New Jersey from 1995 and 2015, and 95 percent of them were in the 16-to-17-year-old age bracket.

"Marriage is a loving bond between two people," state Assemblywoman Nancy Munoz, R-Union, one of the bill's prime sponsors, said in an announcement. "Forcing young girls into arranged marriages is harmful and a violation of their basic human rights. Getting this law passed was a long fight, but well worth it. I appreciate my colleagues support in helping this legislation became law."

State Sen. Nellie Pou, D-Passaic, who also sponsored the measure, said the law was necessary. "We have a responsibility to protect our residents and a moral obligation to safeguard children and preventing them from being forced into marriages is a social obligation we will now meet in New Jersey," she said.

The National Organization for Women of New Jersey and Human Rights Watch backed the legislation. Chelsea Clinton also tweeted her congratulations.

Thank you @UnchainedAtLast, @FraidyReiss & everyone who worked so hard to help New Jersey become the 2nd state to #endchildmarriage! https://t.co/ObaIEmo55y — Chelsea Clinton (@ChelseaClinton) June 22, 2018

Numerous times, it appeared the legislation was in trouble.

Last month, Assembly Speaker Craig Coughlin, D-Middlesex, abruptly pulled the bill from the voting agenda at the request of Assemblyman Gary Schaer, D-Passaic. Schaer said he had been approached by members of the orthodox Jewish community requesting the legislation allow for religious exceptions.

The bill, (A865) was not amended. The Assembly passed it June 7, sending it to Murphy's desk.

"In New Jersey, we are dedicated to protecting children by putting an end to child marriages by raising the minimum age to 18," Murphy, a Democrat, said in a statement, which included a photo of the bill signing he held privately with Reiss and other advocates.

"Studies have consistently showed that minors who enter into marriage -- particularly young women -- are less likely to graduate from high school and college and more likely to suffer domestic abuse and live in poverty," according to Murphy's statement. "I am proud to join with the Legislature to make New Jersey a national leader on this important human rights issue."

Gov. Chris Christie, a Republican, vetoed the bill last May, saying it created a "does not comport with the sensibilities and, in some cases, the religious customs, of the people of this state."

Gov. Phil Murphy signed a law that requires youth to wait until they are 18 to marry. He was joined by Fraidy Reiss, right, and other members of Unchained at Last, an advocacy group formed to stop child marriage. (Courtesy of Gov. Phil Murphy's office)

Susan K. Livio may be reached at slivio@njadvancemedia.com. Follow her on Twitter @SusanKLivio. Find NJ.com Politics on Facebook.