West Virginia Governor Jim Justice signed a bill on Wednesday that would restrict child marriage in the Mountain State.

The bill agrees to let 16- and 17-year-olds get married with restrictions.

Those ages 16 and 17 will have to obtain parental consent and they couldn’t marry someone more than four years older than them. Existing legal marriages, including those done in other states, would be unaffected.

Some Democrats, including the bill’s sponsor, Del. Kayla Young of Kanawha County, had hoped to eliminated child marriage altogether, while some Republicans spoke about how they or their parents had married before adulthood and that such marriages protect families.

“This is a huge step to protecting our youngest children,” Young said on Twitter.

Seven states have set the minimum age for marriage at 18, all since 2018, according to the nonprofit group Unchained At Last, which seeks to end forced and child marriage. Supporters of such legislation say it reduces domestic violence, unwanted pregnancies and improves the lives of teens.

According to the Pew Research Center, West Virginia had the highest rate of child marriages among the states in 2014, when the state’s five-year average was 7.1 marriages for every 1,000 children ages 15 to 17. Recent figures were unavailable.