SALT LAKE CITY — A bill to ban child marriages in Utah has passed a House committee, but only after an exception was carved into it.

Rep. Angela Romero, D-Salt Lake City, is sponsoring House Bill 234, which prohibits marriage under 18. The bill was modified to allow an exception for 16 or 17-year-olds, with a juvenile court judge’s permission.

“A child should be a child,” Rep. Romero told the House Judiciary Committee on Monday.

The bill passed unanimously after some emotional — and divided testimony.

“There can be no good reason for a child to marry. None at all,” said Heidi Clark, who said she was pressured into a marriage at 17 because of an unplanned pregnancy that later became abusive.

Nicholeen Peck of the Worldwide Organization for Women spoke against the bill.

“Getting married when they have a pregnancy maybe they didn’t plan on ahead of time is the morally right thing to do for them,” she told the committee. “I think we need to open the door for that.”

LuAnn Cooper, an ex-member of the Kingston polygamous group, told the committee about her marriage at 15 to a man who was both her cousin and her nephew. She urged the committee to ban marriage under 18.

“The girls that are from polygamy or that are in polygamy, because a lot of them are getting married off by their parents at 15 and 16 and before they’re old enough to know it’s a good idea or not,” she said.

House Minority Leader Brian King, D-Salt Lake City, proposed an amendment to block marriages under 18 if they have a seven-year age gap between prospective spouses. That amendment may be considered on the House floor.

The bill passed out of committee unanimously.