TALLAHASSEE, Fla. — Most child marriages in Florida would be banned — though not for 16- and 17-year-olds when there’s a pregnancy — under a bill overwhelmingly approved by the House on Wednesday.

The House carved out the exception by changing a Senate bill that would have banned all marriages of anyone under 18. Representatives debated for an hour on whether to make the change and then eventually passed the bill 108-2.

But even those who opposed the exception said the bill would be far better than the current law that has allowed some child rapists to marry their victims who become pregnant.

“Our law today is shameful. It has us as a poster child for a bad public policy that’s got to get fixed,” Republican Rep. Frank White said.

The attempt to ban child marriage is largely inspired by the story of Sherry Johnson. Johnson was 9 when she was raped by a church deacon, 10 when she gave birth and 11 when she was forced to marry the deacon. Now 58, Johnson has fought for a complete ban on child marriage.

Florida doesn’t allow anyone younger than 18 to independently consent to marriage. Children aged 16 and 17 can marry with the consent of both children’s parents. But if a pregnancy is involved, there is no minimum age for marriage as long as a judge approves the marriage license.

House Speaker Richard Corcoran has supported the exception, saying high school sweethearts should be allowed to marry if the girl becomes pregnant. Coincidentally, the vote was taken on Valentine’s Day.

Several lawmakers — both Republicans and Democrats — argued to keep the outright ban, saying girls can still be forced into a marriage they don’t want.

“There could be situations where a mother or father says to their daughter, ‘Look, you’re going to get married or you’re not going to live in this house anymore because you’re pregnant,” Democratic Rep. Ben Diamond said.

Republican Rep. Jackie Toledo said she was proud to co-sponsor the child marriage ban but opposed the exception.

“What I thought I was signing on to was a bill that prevents minors — children — from getting married with no exceptions. This amendment changes that, and as a mother I’m very uncomfortable with this,” she said. “We are taking vulnerable teenagers out of what should be a protective, supportive environment and into an unstable environment, one where she has no rights (and) limited resources.”

Republican Rep. Heather Fitzenhagen said allowing pregnant girls to get married would give them rights they wouldn’t otherwise have, like insurance benefits her teenage spouse might have or to be able to visit her spouse in jail.

“If there is a couple that wants to take a leap of faith because they love each other and they have a child that they’re trying to raise together, we shouldn’t make it more difficult,” she said. “Yeah, they might not have the best chances in the world, but let’s give them that chance, let’s give the baby that chance to have a home with two loving parents.”