When a Senate panel on Monday killed a bill to soften the state’s controversial ultrasound-before-abortion law, the move disappointed someone besides the usual Democratic suspects: Attorney General Ken Cuccinelli II.

One of the state’s most outspoken abortion foes, Cuccinelli (R) had dispatched his top deputy last week to a Democratic state senator’s office to say that he supported the senator’s legislation to make the ultrasound mandated by last year’s law optional.

Chief Deputy Attorney General Patricia L. West and another aide told Sen. Ralph S. Northam of Norfolk that the office would try to persuade two Republicans in the evenly divided Senate to go along with the measure, Northam said Monday.

“They said that he had never taken a position on the ultrasound bill and was supportive of Senate Bill 1332,” Northam said, referring to his legislation to allow women to opt out of the ultrasound.

Cuccinelli’s office confirmed that the attorney general supports lifting the mandate and that West had offered to help make some language fixes to Northam’s legislation. It also said that it approached “two legislators” at Northam’s request, but they were not interested in amending the bill.

“There were conversations last week with Senator Northam’s office where the attorney general’s office offered conceptual support,” Caroline Gibson, his deputy director of communications, said via e-mail.

Cuccinelli’s support surprised Northam and other Democrats. They characterized it as an election-year conversion by the attorney general, a tea party favorite who is running for governor.

“Ken Cuccinelli has made a career out of attacking women’s reproductive rights and crusading to deny us access to health care,” said Anna Scholl, executive director of ProgressVA. “His record on this issue is clear and it’s one Virginians can’t forget.”

Cuccinelli raised constitutional questions about the ultrasound bill last year. But his nuanced stance drew little notice amid a battle so pitched that it attracted the attention of late-night shows and “Saturday Night Live.”

With Cuccinelli’s help, Northam had high hopes that his bill would make it out of committee and perhaps the full Senate.

Instead, the measure died before the Senate Education and Health Committee Monday afternoon. The panel voted to pass the bill by indefinitely.

What happened between Cuccinelli’s overture and the bill’s collapse is a matter of some dispute, however.

Cuccinelli’s office says it didn’t realize that a vote on the bill, originally scheduled for later this week, was coming Monday. Northam, who is running for lieutenant governor, says Cuccinelli, the GOP front-runner for governor, simply got cold feet about coming out for a bill opposed by his base.

“For his people to come to me the day before the committee was going to hear the bill was what I would call a political epiphany,” Northam said. “It vanished.”

That Cuccinelli would want to soften the ultrasound law also surprised some antiabortion activists. “I would find it very disturbing,” said Don Blake, of the Virginia Christian Alliance. “It would be a big letdown to his base.”

But Cuccinelli, in fact, raised constitutional questions about the bill last year.

“His personal position is that government should not and does not need to mandate an ultrasound, as experts have indicated that ultrasound imaging is already the practice before performing an abortion,” Cuccinelli spokesman Brian J. Gottstein said in a March 2012 e-mail to a Washington Post reporter. “But government can and should require that the doctor offer to share the image with the patient, so she has the information she needs to make a fully informed decision.”

As initially proposed, last year’s bill would have required women to undergo a vaginal ultrasound before an abortion, and for the technician to offer a view of the fetus to the woman. It was later amended to require women to undergo an abdominal ultrasound and be offered a view of that image. That change made the law less physically invasive but probably rendered the test useless, since the fetus is too small to be seen via an abdominal test in the early stages of pregnancy, when most abortions take place.

“It was a mandate, and Ken Cuccinelli is very consistent in his view on the role of government,” said Chris LaCivita, Cuccinelli’s top political consultant. “He was opposed to the mandate last year and is opposed to it this year.”

Northam proposed three bills this session to eliminate or soften the law. Two of them — one calling for its repeal, another preventing the state from requiring medically unnecessary ultrasounds — died in committee.

His third bill would have made the ultrasound optional. It was scheduled to come before the Senate committee for a vote Thursday, but on Sunday, Northam got word that the panel would hear it Monday.

Anticipating that Cuccinelli’s office would be there to support him, Northam said he was upbeat as he walked to the meeting. But on the way there, he said he bumped into Sen. Jeffrey L. McWaters (R-Virginia Beach), one of the two senators whom Northam said the attorney general’s office had promised to lobby on the bill.

According to Northam, McWaters said he’d been approached by Cuccinelli’s office on the matter, but that it later told him that the attorney general was dropping its support.

LaCivita said Cuccinelli’s support for Northam’s bill never wavered.

McWaters, tied up in committee meetings Monday night, declined to comment through a spokeswoman. The other senator that Northam said Cuccinelli’s office said it would approach was Sen. Harry B. Blevins (R-Chesapeake). Blevins, also in meetings, did not respond to a message seeking comment.