GOV. ROBERT F. McDONNELL and some of his fellow Virginia Republicans are shocked, shocked. It turns out that legislation mandating a costly, coercive, medically unnecessary ultrasound procedure would be physically invasive and personally offensive for thousands of women seeking abortions in the state.

So Mr. McDonnell, possibly worried that his vice presidential prospects could evaporate in the intensifying heat and glare of the national abortion debate, has flipped. Previously an enthusiastic advocate of the ultrasound bill — and almost every other measure anti-abortion purists could dream up — the governor suddenly reversed himself and cut his losses. On Wednesday he declared, “No person should be directed to undergo an invasive procedure by the state, without their consent, as a precondition” to abortion.

Faced with tens of thousands of petition signatures, ridicule from Jon Stewart on “The Daily Show” and vigils in Richmond by the bill’s opponents, the governor proposed amendments to water down the legislation before enactment.

Until Wednesday, the governor and other advocates of the ultrasound measure hadn’t concerned themselves much with the details of what the state should require. In their anti-abortion fervor, they thought that requiring ultrasounds, even transvaginal ones, was justified if it would change the minds of some women who’d considered ending their pregnancies.

The vast majority of the bill’s advocates, in Virginia as in seven other states that have enacted similar legislation, are Republicans who decry government intrusion — into health care, public schools, private industry, you name it. Mr. McDonnell has even objected to full-body pat-downs by security personnel at airports. But until the political winds shifted, a state-mandated probe inserted into the vagina was fine by him.

The decision to perform an ultrasound before abortion is a medical one that rightfully should be made by a patient and doctor in consultation. When lawmakers and governors intervene in that decision, they politicize women’s health care. Even now, in its amended version, the Virginia legislation would require an abdominal ultrasound of women seeking an abortion — again, a decision best left to a woman and her physician. Not only that — it would require the woman to pay for the procedure, whether she wants it or not. This from the folks who say the government can’t make you buy health insurance.