Republican presidential candidate Mitt Romney campaigns in October 2011 with Va. Gov. Bob McDonnell in Fairfax. (Melina Mara/THE WASHINGTON POST)

As a legislator, attorney general and governor, Robert F. McDonnell has said he opposes abortion in all but one instance: if continuing the pregnancy would put the woman’s life in danger.

But McDonnell, a possible vice presidential candidate, recently said through his spokesman that he would also allow it in cases of rape or incest.

The statement has prompted many supporters and opponents to believe that he has modified one of his core political stances. Some suspect he has done so to improve his chances of being picked as a running mate for presumed Republican presidential nominee Mitt Romney, whose own position on abortion has shifted over time but makes exceptions for rape, incest and the life of the woman.

“That shocks me,’’ said Olivia Gans, president of the Virginia Society for Human Life, which endorsed McDonnell for governor. “I have never heard him make those comments. It was certainly not his position when he ran for attorney general or governor.’’

But McDonnell spokesman Tucker Martin said the governor’s position has not changed. It has been misunderstood, he said, over the past two decades. He did not explain why McDonnell had not tried harder to correct the record if that was the case.

Since McDonnell’s days as a delegate from Virginia Beach, countless news accounts have reported that he opposes abortion except when the woman’s life is in danger.

Martin acknowledged that was how McDonnell’s position had been reported but said those news accounts had been in error. Martin pointed to one newspaper article in 1996, when McDonnell was a delegate, that mentioned rape and incest in connection with McDonnell’s stance. It described McDonnell as someone who “opposes abortions except when the life of the mother is at stake, but from the public policy standpoint realizes that exceptions also should be made in the case of rape or incest.’’

In a statement issued to The Washington Post last month in response to criticism from Democrats of an abortion bill being debated in Richmond, Martin said: “The governor’s position is he is pro-life with exceptions for rape, incest and life of the mother.”

Once one of the most conservative voices in the Virginia General Assembly, McDonnell has shied away from talking about social issues in recent years. Instead, as the popular governor of a state that could help determine the winner of the presidential race and the balance of power in the U.S. Senate, he speaks mostly of jobs and schools. He tries to strike a middle ground on policies favored by the conservative wing of his party.

Political observers say McDonnell’s inclusion of rape and incest exceptions could help him on the national stage, allowing him to appeal to conservatives who oppose abortion rights while picking up the backing of moderates and independents.

A more conservative abortion view might have helped McDonnell while running for the legislature or in a Republican primary, said Stephen Farnsworth, a political science professor at the University of Mary Washington. But it would not be a plus for a GOP vice-presidential nominee or a U.S. Senate candidate, he added.

Most pundits weighing McDonnell’s vice presidential prospects say the chairman of the Republican Governors Association’s biggest negative is that he may be perceived as too socially conservative, especially after signing a bill into law last month requiring that women undergo an ultrasound before an abortion.

“The more extreme position McDonnell takes, the more problematic,’’ Farnsworth said. “If you provide you are open to more exceptions, you’re going to increase your appeal to moderate voters.’’

‘Extreme positions’

In his 14 years in the House of Delegates, McDonnell sponsored or co-sponsored 35 bills to restrict abortion, although many of them were the same legislation introduced year after year.

He backed a ban on late-term abortions, a requirement that minors receive parental consent before getting an abortion and a mandated 24-hour waiting period for women seeking abortions. All three passed the General Assembly.

Four years into his legislative tenure, McDonnell represented Virginia on the platform committee at the Republican National Convention, the year his party nominated former senator Bob Dole for president. The platform in 1996 called for a half-dozen constitutional amendments, including a ban on abortion, even in cases of rape or incest.

In 1999, on a questionnairefrom Project Vote Smart, McDonnell stated that abortions should be legal when the life of the woman is endangered but not when the pregnancy resulted from rape or incest. McDonnell has declined to answer subsequent surveys.

Tarina Keene, executive director of NARAL Pro-Choice Virginia, said McDonnell is trying to change his views after years of being out of the mainstream.

“Privately, he still holds extreme positions while publicly he is trying to portray himself as someone else,’’ she said. “You don’t switch your viewpoint on this overnight. These are your core values. It’s obvious governor McDonnell is trying to Etch a Sketch his record.’’

In his two statewide runs, McDonnell and his staff said he opposed abortion in every instance except when the woman’s life was in danger.

At a 2008 speech before the National Right to Life Committee in Arlington County as attorney general, McDonnell said that victory in state elections was key to its cause.

“While you’re on this Earth, we need your help at every election. . . . Those policymakers with the votes determine whether or not you’re going to have a pro-life state where protections are given to the unborn consistent with federal court decisions or whether you’re going to have a different kind of policy.”

In 2009, when he ran for governor, it was widely reported that McDonnell’s position on abortion allowed only the life-of-the-woman exception. That received lots of attention, in part because his Democratic opponent, Sen. R. Creigh Deeds of Bath, had a strategy of stressing McDonnell’s focus on social issues. McDonnell countered that the Democrat was the one fixated on those issues — but he never disputed Deeds’s characterization of his abortion stance.

“His message has changed,’’ said Kellie McHugh, executive director of Virginians for Life. “He’s always presented himself as 100 percent pro-life. He’s either flip-flopped or not being honest.’’

‘Altered his intensity’

After taking office in 2010, McDonnell surprised supporters and critics alike by largely governing from the middle. He has worked to shore up the state’s economy, ease traffic congestion and boost education opportunities, balancing his centrist persona with his conservative roots.

As governor, McDonnell removed most state funding from Planned Parenthood, but he stopped short of his campaign promise to cut all funds from the nation’s largest abortion provider. After an aggressive lobbying campaign, he instead proposed a less controversial move that would prevent state money from funding most abortions but would maintain it in cases of rape or incest or when the life of the woman is at risk. McDonnell said he brought Virginia in line with federal law and could not cut funds for other services, such as counseling.

“It’s just troubling,’’ said Don Blake, chairman of the Virginia Christian Alliance. “The sad thing is Bob has alienated two sides of the issue. When you walk in the middle of the road and try to appease both sides, you alienate people.’’

Earlier this year, amid ridicule on national TV and massive protests in Richmond, McDonnell stepped in to weaken the ultrasound bill he had initially supported so that it would no longer require a vaginal ultrasound.

McDonnell did not support the so-called personhood bill that would have given rights to a fertilized egg and had a hand in putting an end to the legislation after stressing to his new, Republican-majority General Assembly not to overreach on conservative issues.

“He’s definitely altered his intensity,” said Del. Robert G. Marshall (R-Prince William), who introduced the personhood bill. “He certainly has done that.”

Staff researcher Magda Jean-Louis contributed to this report.