The race to succeed Attorney General Ken T. Cuccinelli II pits a Republican who has been philosophically in step with the incumbent against a Democrat who says he’d head in the opposite direction.

State Sen. Mark D. Obenshain (R-Harrisonburg) faces Sen. Mark R. Herring (D-Loudoun) in the low-profile but consequential contest.

The attorney general’s race is always overshadowed by the one for governor, and this year’s slugfest between Cuccinelli (R) and Democrat Terry R. McAuliffe (D) has had no trouble dominating the Virginia political scene.

The Herring-Obenshain matchup also has been dwarfed by the lieutenant governor’s race, a typically below-the-radar affair that is grabbing headlines this time because one of the candidates, Chesapeake minister E.W. Jackson (R), has made a string of blunt statements about gays, Planned Parenthood and non-Christians.

The attorney general’s race will decide who serves as the commonwealth’s top lawyer, presiding over a 400-employee public law firm that reviews, interprets and defends Virginia law. The contest also could help determine who’s at the top of the ticket in four years, given that the past six attorneys general have run for governor, including outgoing Gov. Robert F. McDonnell (R).

Herring and Obenshain have come down on the opposite sides of many issues in the Senate, where Obenshain has served since 2003 and Herring since 2006. On the campaign trail, as in the ornate Senate chamber, they have had sharp philosophical disagreements on issues such as Medicaid expansion and gay rights.

They do agree on a few issues, including one inspired by a gifts scandal that has dominated McDonnell’s last year in office. Both candidates call for ethics reform and a limit on gifts to office-holders.

Throughout the campaign, Obenshain has tried to steer clear of hot-button social issues, stressing his professional experience as the managing partner of one large law firm and the founder of another.

He has stressed broad conservative themes such as “liberty.” That harks back to a note discovered in his father’s desk after his death in a plane crash in 1978. Richard “Dick” Obenshain, who was campaigning for the U.S. Senate when he died, had written: “The most important goal in my life is to have a meaningful impact on preserving — and expanding — the realm of personal freedom in the life of this nation.”

For Obenshain, that has translated into opposing the new federal health-care law and environmental regulations on coal and storm water, as well as sponsoring legislation to strengthen property rights and promote school choice. He has also stressed his legislative record related to criminal law, including sponsorship of bills that increased penalties for repeat drug offenders and sexual predators.

“We’ve got to stand up and push back when the federal government steps over the line,” Obenshain said at an October debate. “And I will do that.”

Herring, also a lawyer in private practice, has sought to make the campaign largely about Cuccinelli, a social conservative who developed a national reputation for his battles against the federal government, a university climate scientist and public colleges with policies that protect gay people from discrimination. Herring has said that Obenshain is likely to take the attorney general’s office further down that activist path, one that he says has made Virginia a less appealing place to do business.

“Time and again, he has bent and twisted the law and misused and abused the power of the office in order to advance personal ambition and an extreme ideological agenda,” Herring said of Cuccinelli in the debate. “Senator Obenshain would be a continuation of what we’ve got.”

Herring has tried to make that argument by stressing social issues, highlighting his support for abortion rights, gay rights and stricter gun control while noting Obenshain’s opposition.

At times, Obenshain has used the same forceful rhetoric that brought Cuccinelli to prominence.

“Are you ready to stop Obamacare in its tracks?” he asked the cheering crowd that endorsed him at a May convention.

He has sought to distinguish himself from Cuccinelli at times, both substantively and stylistically. He said in June that he did not think Cuccinelli’s investigation of University of Virginia climate scientist Michael Mann had been warranted, for instance. And he has portrayed himself in a softer light in television ads. One shows Obenshain’s daughter, his driver throughout the campaign, behind the wheel.

“My dad’s encouraged me to be strong and independent in pursuing my dreams,” she says in another commercial, which also features his mother.

Obenshain has said that Herring would politicize the office, noting the Democrat’s reluctance to say whether he would defend Virginia laws he disagrees with, such as those banning gay marriage, allowing the state to take over failing schools and imposing strict voter ID requirements. It is the attorney general’s job to defend state law, Obenshain said, regardless of his personal opinion of them.

When it comes to his own record, Herring has highlighted his sponsorship of legislation to strengthen penalties in domestic violence cases and to ban synthetic forms of marijuana. He has also stressed his support for a $1.4 billion-a-year transportation funding overhaul passed this year, which Obenshain opposed.