ALBANY, N.Y. (AP) - The New York Legislature has overturned a state law that allows 14-year-olds to legally wed.

The Democratic-led Assembly passed a bill Thursday that would increase the age of marriage to 17. The Republican-led Senate passed the measure earlier this week.

New York is one of three states that allows children as young as 14 to marry with parental and judicial consent.

Child advocates say the law can trap minors in forced marriages, sexual abuse and domestic violence.

The bill would prohibit marriage for individuals under 17 years old, and children ages 17 to 18 would require court approval.

The bill now heads to Democratic Gov. Andrew Cuomo for approval. Cuomo designated the proposal a top priority in February and in a statement Thursday said:

"It’s shocking current law allows for children as young as 14 to be married off. This administration championed ending this intolerable practice and I commend the Assembly and the Senate for passing legislation that puts an end to child marriage in New York once and for all. This is a major step forward that will protect children, prevent forced marriages, and create a safer, more just, New York for all."