Medical experts widely agree that the HPV vaccine is a safe way to protect women from a type of cancer that kills 4,000 of them a year in the United States. (Katherine Frey/The Washington Post)

Virginia and the District, next-door neighbors but politically worlds apart, are the only places in America that direct schoolgirls to get immunized against a virus linked to cervical cancer before starting sixth grade.

The unlikely bedfellows briefly had company in Texas, thanks to Gov. Rick Perry’s short-lived vaccination order, which shook up his presidential campaign last week.

Campaign rivals, social conservatives and tea party activists questioned his Republican credentials for mandating that 11- to 12-year-old girls get the human papillomavirus (HPV) vaccine. They linked Perry’s 2007 executive order, quickly undone by the state legislature, to two potentially mortal conservative sins: early sex and government meddling.

Yet for all the heat the issue brought the presidential hopeful from his party’s base, HPV politics do not break neatly along conventional liberal-conservative fault lines — at least not in the two locales that followed Perry’s lead.

Conservatives may generally oppose the mandate as government intrusion into private health-care decisions and a green light for teen sex, because the virus is sexually transmitted. Liberals may welcome it as enlightened public-health policy.

But consider the conservative Republican Virginia state delegate, the one the National Abortion Rights Action League describes as “rabidly anti-choice,” who is a champion of the vaccine mandate.

Then there’s the D.C. Statehood Green Party member, so upset and suspicious that Big Pharma was pushing the vaccine without sufficient testing that he had to be escorted from a public meeting when the measure was approved.

There is the liberal-leaning Northern Virginia mother, who shops for organic produce at farmers markets and chose, under the state’s liberal opt-out policy, not to have her teenage daughter vaccinated, believing that the three-dose regimen was a lot of chemicals.

And then there’s the internationally known health expert who fervently believes that the vaccine is good medicine — and feels just as strongly that mandating it is a strategic mistake.

“It’s just a fascinating, multidimensional problem,” said Lawrence Gostin, a global health law expert who is director of Georgetown University’s law school. “The first dimension is sex and parental responsibility, which is a core conservative, religious view. The second dimension is the health and life of young girls, which really is a pro-life view. And the third dimension is the corporate intrusion, and on the corporate intrusion, the left is likely to be upset about it.”

The politics of HPV are muddled, he said, in part because vaccinations, especially government mandated ones, hit a nerve. Vaccines are one of the most physically intrusive things government can do to a citizen, he added.

Medical experts widely agree that the HPV vaccine is a safe way to protect women from a type of cancer that kills 4,000 of them a year in the United States. More than 35 million Americans have received the vaccine with no pattern of serious side effects, federal health officials have said.

That’s why Peter MacPherson, a District schools activist, chose to have his daughter, now 14 and a freshman at the School Without Walls, vaccinated when the city approved its policy.

The District and Virginia have liberal opt-out policies that allow parents to decline the vaccination for any reason. Even so, HPV vaccination rates there are above the national average. About 58 percent of D.C. girls ages 13 to 17 have had at least one dose of the vaccine, as have 54 percent in Virginia, compared with 49 percent nationwide, according to the federal Centers for Disease Control and Prevention. In nearby Maryland, which does not mandate the vaccine, the rate is about 42 percent.

“Being a parent of a teenage girl, you can imagine how squeamish I am on the subject of sexuality,” said MacPherson, who has a good friend whose sister died of cervical cancer at 26. “We’ve got to think about their long-term health, and to deny them that simply because we are squeamish, I think, it’s a great ethical failure on our part.”

MacPherson describes himself as socially liberal. “I think mandating the HPV vaccine is the only good thing Rick Perry has done as governor, from what I can tell,” he said.

But when the measure was before the D.C. Council, it so raised the ire of Chris Otten of the D.C. Statehood Green Party that he disrupted the meeting. As he was being escorted out of council chambers, he expressed concern that pharmaceutical company Merck, which had sent lobbyists and campaign cash to lawmakers across the country, had not adequately tested its vaccine.

Across the Potomac River — and the political spectrum — is Del. Christopher P. Stolle (R-Virginia Beach). An obstetrician-gynecologist, Stolle is a social conservative who strongly supports mandating the HPV vaccine.

He was not in office when Virginia passed its mandate, but he spoke out in January against a bill to eliminate it. (The measure easily passed the House but died in the Senate.)

“I’m a conservative Republican,” Stolle said. “The number-one function of government is to protect its citizens. . . . That absolutely falls within the role of a limited, conservative government.”

Anneli Barnes of Alexandria describes herself as a social liberal, one who chose not to have her 13-year-old daughter vaccinated.

“TOTALLY opted against the HPV vaccine,” she said in response to an e-mail query from The Washington Post.

Barnes questions the wisdom of giving girls a three-shot dose of a brand-new drug. Although she buys organic when she can afford to, she doesn’t consider herself a fanatic. Even when a now-debunked autism link had scared many parents away from numerous vaccines, she made sure her daughter had all the conventional shots.

But the HPV vaccine gives her pause.

“Three shots — that’s a pretty big dose of chemicals you’re putting into your body,” said Barnes, 45. “I can’t make choices about smog in the air, but I can make choices about what we eat and drink and [some of] what we’re exposed to.”

Barnes said she read online reports of adverse reactions to the vaccine. She said she realizes that with tens of millions of people having received it, there were bound to be reported problems, perhaps some mistakenly attributed to the shots. But even rare adverse reactions are concerning, she said.

“When it’s your kid, even a small number, it strikes home a little bit,” she said.

Sometimes vaccine fears have been realized, said Gostin, the Georgetown law professor who thinks vaccinating girls will save lives but fears government mandates will backfire. He noted that the swine flu vaccine administered during the Ford administration was linked to Guillain-Barre, or chronic fatigue, syndrome.

But for the most part, he said, vaccines have been lifesavers. Though that hasn’t stopped them from making for poisonous politics.

“The anti-vaccination movement has been going on since Thomas Jefferson,” Gostin said, noting that objections to smallpox vaccinations sounded like today’s arguments against the HPV vaccine. “They expressed scientific objections about efficacy, worried that the vaccine transmitted disease, [or objected over] religion or principle.”