WHEN THE Democratic attorney general of Virginia, Mark Herring, declared last month that he would join a legal battle against the state’s ban on same-sex marriage, Republicans attacked him for injecting rank partisanship into the high office to which he had just ascended. Two weeks later, Mr. Herring has proved them right.

In a “Dear Friends” e-mail blast sent on “Mark Herring for Attorney General” letterhead, Mr. Herring attacked “strident partisans and social conservatives” opposed to his decision and invited his own strident partisans to click “here to stand with Senator Tim Kaine, the Democratic Governors Association and me and stand up for equality in Virginia.”

“Clicking here” directs recipients to a page where they are invited to sign a petition by furnishing their names and e-mail addresses. Thus Mr. Herring seamlessly blends the role of political opportunist, building his mailing and fundraising lists for a future electoral campaign, with his role of chief counsel for the Commonwealth of Virginia.

We supported Mr. Herring’s candidacy for attorney general as well as his precedent-breaking decision to support the lawsuit against the Virginia constitution’s marriage ban. In our view, the weight of the U.S. Constitution, as well as federal court rulings quashing state bans on same-sex marriage (and a signal from the Supreme Court suggesting that it may eventually grant constitutional protection to such unions), justified the attorney general’s stance.

Still, Mr. Herring was undoubtedly aware of the politically charged and highly partisan nature of the debate over same-sex marriage. As party to a lawsuit challenging Virginia’s ban, and as the state’s attorney in the matter, the wise thing would have been to take a lawyerly, professional and dispassionate approach. This was especially so given that, prior to Mr. Herring’s very narrow victory, he had not informed voters he would take such a step. By attempting to use the lawsuit for political gain, Mr. Herring does precisely the opposite. The “Dear Friends” e-mail lends a distinctly political cast to what should be, from the perspective of the attorney general of Virginia, a substantive constitutional fight.

Of course, Democratic (and Republican) operatives are of the view that in modern American politics, everything and anything is fodder for permanent political warfare. As one of his advisers explained to us, Mr. Herring would have been guilty of political malpractice had he failed to broadcast his “achievement” in enlisting the state into the battle for equal rights on behalf of same-sex couples.

Nonetheless, many Democrats expressed concern and indignation that former attorney general Ken Cuccinelli II, a Republican, had politicized his office by engaging in numerous partisan crusades. Now Mr. Herring seems to be taking his lessons from Mr. Cuccinelli.