TALLAHASSEE, Fla. — It will soon be illegal in Florida for anyone under the age of 17 to get married under a bill signed into law by Gov. Rick Scott.

Scott on Friday signed 74 bills into law including the ban on child marriages and a tax cut package that authorizes a back-to-school sales tax holiday in August.

The ban takes effect in July.

The legislation was a compromise between the House and Senate. The Senate originally passed a bill that banned the marriage of anyone under 18, but the House wanted exceptions for some 16- and 17-year-olds when there’s a pregnancy.

The bill signed by Scott would set limits on the marriage of 17-year-olds. While pregnancy won’t be a factor, anyone marrying a 17-year-old couldn’t be more than two years older and minors would need parental consent.