WASHINGTON -- Va. Gov. Bob McDonnell signed a controversial mandatory ultrasound bill into law Wednesday afternoon, making Virginia the seventh state to require women to have an ultrasound procedure before they can legally have an abortion.

A previous version of the bill would have forced women to undergo an invasive, likely painful transvaginal ultrasound procedure if she was too early into the pregnancy for a more typical transabdominal one to detect fetal age. After that bill sparked widespread protests, McDonnell and House Republicans worked together to write a new bill that would allow women to opt out of the more invasive procedure in favor of an external one.

Democrats are still not pleased with the compromise. Critics of the bill say that it's medically unnecessary and constitutes an egregious government overreach into personal medical decisions that women should make with their doctors.

The bill, which some Democrats are comparing to state-sponsored rape, has sparked several protests at Virginia's state Capitol in Richmond.

"We have taken out the state-required rape from the bill, but the way it is now is still an assault because it's an unwanted touching," state Sen. Janet Howell (D) told HuffPost in an interview, "and the woman is being coerced to have that happen in order to exercise her constitutional right to an abortion."

Americans United for Life, an anti-abortion group that wrote a model ultrasound bill on which Virginia Republicans and lawmakers from several other states have based theirs, called Virginia's new law the "gold standard of medical care" on Wednesday.

"Abortion advocates engaged in a vicious campaign of misinformation against a proposal that would require a life-saving ultrasound test before giving women an abortion-inducing drug or an abortion procedure," AUL CEO Dr. Charmaine Yoest said in a statement on Wednesday. "We know that women with ectopic pregnancies have died when given life-ending drugs, which makes it particularly egregious that abortion advocates fought to prevent women from having all the medical information they need for informed consent. Ultrasounds are the gold standard of medical care, and women deserve to have such testing."