Republican presidential candidate Ben Carson speaks in Lakewood, Colo., on Oct. 29, 2015. (David Zalubowski/AP)

The doctor wore hospital scrubs and spoke directly to the camera. “Let us not be duped,” Ben Carson said.

It was 1992. Maryland voters were about to decide on a ballot measure proposing to loosen state restrictions on abortion. Abortion opponents had a powerful new ally: the daring neurosurgeon whose up-from-poverty story had made him a Baltimore hero.

In a TV ad, Carson said the measure “fails to provide any health or safety regulations” on abortion clinics.

“A humdinger,” thought Frederica Mathewes-Green, an antiabortion activist.

But then, after the ad had run for 10 days, a colleague called her to the office TV.

“There he was, standing behind the podium with their logo on it and saying that he didn’t know this would be a political ad,” Mathewes-Green recalled. Carson was at a news conference, organized by abortion rights activists. He was denouncing his own ad.

That episode was one of Carson’s first forays into politics, and it left both sides of the fight thoroughly bewildered. Was it really possible that Carson, this brilliant doctor, had not thought through the consequences of jumping into the abortion debate?

“How do you allow yourself to get stuck in the middle of such a hot issue and — with that kind of an educational capacity, that kind of intelligence — not do the research?” said Stacie Spector, who managed the abortion rights side of the campaign.

Today, the Maryland story foreshadows two problems with which Carson still struggles as he has become a front-runner for the Republican presidential nomination. One is his tendency to take bold positions but then double back and change them as he learns more about the subjects at issue.

The other is his long-running evolution on abortion. He once supported abortion rights. Now, he opposes the procedure in most cases, but he is sometimes open to compromise on questions such as when life begins. To keep the support of evangelical voters, Carson may have to explain why he has held such varying views about a subject on which many conservatives see only one correct answer.

In a recent interview about the 1992 measure, Carson said he should be judged on what he believes now.

“There was a time when I was a Democrat. Should I be condemned for that, and executed for that? My views were consistent with that, but I changed,” Carson said last week. “You’re talking about things that happened more than two decades ago. I’m a different person than I was two decades ago, and everybody else should be, too.”

Back then, Carson was the 41-year-old director of pediatric neurosurgery at Johns Hopkins Hospital. He was already famous, both for a 1987 operation that separated infant twins conjoined at the head and for his 1990 autobiography, “Gifted Hands.”

He was well known for speaking about his Christian faith. But he had little to do with politics.

That changed in 1992 with the ballot measure in Maryland. The law in question was designed to be a legal backup plan in case the Roe v. Wade decision was ever overturned by the Supreme Court. Abortion rights groups wanted a state-level law that would keep abortion legal and widely available in Maryland.

Abortion opponents said the measure would also wipe out some restrictions that were still on the books. They were thrilled to hear, through an intermediary, that Carson was willing to help.

“He’s a low-key kind of person. It’s not like we heard a lot of enthusiasm. But he . . . seemed quite willing to give us a hand,” Mathewes-Green recalled. They faxed Carson an ad script. He faxed it back with revisions; Carson said later that he was toning down the script to remove explicit arguments against abortion itself.

Then he sat down in a studio in Baltimore, and — by Mathewes-Green’s recollection — did almost 30 takes before he got it right.

“ ‘The Vote kNOw Coalition’ appeared on the stationery that we used every time” they faxed, Mathewes-Green said. “And every time it was the last line of the ad: The voice-over would come on” and urge people to “Vote Against Question 6.”

So Carson understood this was a political ad? “We certainly thought he did,” she said.

The odd thing was, unlike many of the groups he was helping, Carson did not want to outlaw abortion.

“I would never advocate it’s illegal for a person to get an abortion,” Carson told the Baltimore Sun in September 1992, while the ads were still running. Carson told the Sun that he personally opposed abortion but that in his practice he often referred pregnant women whose fetuses had birth defects to doctors who performed abortions. “I believe that person needs to hear both sides,” Carson said then.

And so abortion rights advocates were stunned to find a neurosurgeon, without an obvious connection to the issue, working against them.

“What’s he doing in this?” Spector remembered thinking. She and others in her group resolved to ask him directly. They met with Carson in his office at Johns Hopkins. Spector said she told Carson he had repeated false information about the details of the law. Carson offered to ask the other side to pull the ad down. “I said, ‘Well, it’s a little late for that,’ ” she recalled.

So, on Oct. 1, 1992, Carson appeared on TV to reject the ad. The abortion rights campaign produced a spot that cast Carson as a victim of the other side’s deceit. “Physician ‘misled,’ ” the ad said, next to Carson’s photo.

“Our side really lost credibility with people. It made it seem like we were being dishonest,” said Chris Currie, another abortion opponent who worked against the measure that year. He felt Carson was casting opponents of abortions as villains to cover up for his own mistake in judgment. “I guess that’s one thing that I felt most disappointed [about]. He’s never really sort of ’fessed up to what he did.”

On Election Day, the opponents lost. As expected. The ballot measure passed, 62 percent to 38 percent.

Even Carson treated the episode as a strange venture into politics. In a 1998 commencement speech at the Seventh-day Adventist-affiliated Andrews University in Michigan, Carson said it took courage for him to distance himself from an ad that he had concluded was misleading. But he also acknowledged the pinch he had put himself in, delivering as a punch line the bewildering effect of his switch: “When all the dust settled, both the pro-life people and the pro-choice people thought that I was on their side.”

The audience laughed.

Since the Maryland vote, Carson has become a national conservative hero — and has changed his position on abortion, which he now wants to be illegal in almost all circumstances.

“I began to think about, if abolitionists a long time ago had said, ‘I don’t believe in slavery, but anybody else can do it if they want to,’ where would we be today?” he said on CNN this year, comparing that to his past position on abortion.

But his position remains nuanced. Carson has been criticized for research on which he collaborated in the early 1990s that used tissue from aborted fetuses. (Referring to the fetal tissue, he told The Washington Post this year that the ethics of such studies have “everything to do with how it’s acquired.”)

He has also cast abortion, a subject many see as a moral absolute, as an area in which conservatives might seek compromise — for instance on the question of when life begins, and when, by extension, abortion should be banned.

“Certainly once the heart starts beating. Certainly at that point,” life has begun, Carson said on Fox Business News in August. That was a deviation from the stance that life begins at conception, which Carson said is his personal belief. That compromise would theoretically allow several weeks of early gestation in which abortion might be legal. “This is something that we need to come to accommodation. And, you know, if we are willing to open up the discussion — both sides — I think we can come to accommodation.”

Today, Carson has a number of rivals for the evangelical vote — especially in Iowa, where he is leading the polls. There have been whispers about his views on abortion, and quietly, some Republican campaigns sound ready to see action taken. They suggest that somebody — not they, but somebody — might tell voters about the 1992 Maryland referendum and about fetal tissue.

But no campaign or rival candidate will go on the record making these arguments against a man so beloved for his pre-politics career.

The exception, as always, is Donald Trump. “You know, like, Ben was — he was pro-abortion not so long ago, as everybody has told me; I don’t know it personally,” the billionaire candidate said on MSNBC’s “Morning Joe” in late October. But Trump, too, supported abortion rights not long ago.

But the importance of this issue to Carson in this election was underscored in August. Mathewes-Green, the antiabortion campaigner from 1992, had put up a post on her personal blog about Carson’s flip-flop back then. She ended with a verse from Psalms, about the bitterness of an ally’s betrayal: “If it were an enemy who taunts me, then I could bear it; but it is you, my familiar friend.”

That day, her phone rang. Carson wanted to explain himself, after all these years. She told him, “I forgive you.”

They concluded with a prayer. Mathewes-Green, who is now a writer on Christian spirituality, said she asked God to help Carson on the campaign trail. Give him courage, she said. And help him to speak the truth with clarity and precision.

“I could hear Dr. Carson doing that sort of murmuring agreement” over the phone line, Mathewes-Green recalled. “Which was nice.”

Alice Crites and Katie Zezima contributed to this report.