A bill that would raise the age of consent to marry in New York to 18 is heading to Gov. Andrew Cuomo's after it was given final passage on Thursday in the state Assembly.

The measure is meant to build on a 2017 law that barred teen marriages, but gave an exception to those 17 years old with permission from a judge. The bill that will now hit Cuomo's desk will raise the age of consent to 18 without exceptions.

“Our children deserve to have a childhood – which is taken away from them when they marry while still actual children," Speaker Carl Heastie said. “We made huge steps in protecting children, and girls especially, from being forced into marriages in 2017. Today’s legislation furthers that, removing a provision that allows 17 year olds to marry at a judge’s discretion.”

The 2017 law raised the age of consent from 14 to 18 with the judicial stipulation for 17-year-olds in New York. At the time, lawmakers were addressing concerns over arranged marriages in some religious communities that allowed for teens to marry, often to older men.

“Child marriages have been determined by the U.N. to be akin to slavery, and it has no place in our state or in our country,” Assemblyman Phil Ramos said. “Raising the age of consent to marry from 14 to 18 was necessary and right, and I am glad that we are taking the final step to ensure that all New York’s children are protected from being forced into a marriage under-age.”