It is not the headline that Ken Cuccinelli II would have written, of course.

But considering the flak Virginia’s attorney general has received for pressing his defense of the commonwealth’s “crimes against nature” law to the Supreme Court, Cornell law professor Michael Dorf’s recent post must seem almost like vindication:

“Virginia AG Ken Cuccinelli’s Anti-Sodomy Cert Petition Is Not Nearly As Crazy As People Say,” Dorf wrote on his blog, Dorf on Law.

Faint praise, as Dorf laughingly acknowledged in a recent interview. But he thinks Cuccinelli has a reasonable legal argument in contesting a federal appeals court ruling that said Virginia’s anti-sodomy law is unconstitutional in all circumstances, and thus convictions predicated on it cannot stand.

Other legal commentators strongly disagree with Cuccinelli’s argument, and Chief Justice John G. Roberts Jr. this month rejected Virginia’s request to put the ruling on hold.

The full court will decide this fall whether the decision from the U.S. Court of Appeals for the 4th Circuit in Richmond warrants its review.

The 2 to 1 decision said the Supreme Court’s landmark 2003 gay rights ruling in Lawrence v. Texas, which struck down a similar Texas law, leaves no room for broad state laws that criminalize oral and anal sex.

Naturally, it is difficult to separate the legally legitimate from the politically expedient when Republican Cuccinelli is embroiled in the country’s hottest political race, the campaign for governor against Democrat Terry McAuliffe.

Cuccinelli’s campaign has built a Web site that portrays the law as the commonwealth’s last defense against pedophilia and helpfully provides a listing of sex offenders by Zip code.

Add to the mix Cuccinelli’s past condemnation of homosexuality and his generally conservative views, and his stand has been mocked by the ladies of “The View” and late-night comics. Jay Leno not only made Cuccinelli the punch line of a joke but also mispronounced his name in the process.

The case at issue doesn’t involve homosexuality but the distasteful tale of then-47-year-old William Scott MacDonald, who in 2004 requested oral sex in the most direct way possible from a 17-year-old girl. She did not comply, but MacDonald was later charged and convicted of soliciting a minor to commit a felony.

That would be Virginia’s law that makes a felon of anyone who “carnally knows any male or female person by the anus or with the mouth, or voluntarily submits to such carnal knowledge.”

Virginia agrees that the Supreme Court’s Lawrence decision makes the law inapplicable to consenting adults. But it points to language in Justice Anthony M. Kennedy’s opinion that it contends opens the door for using the law in other circumstances:

“The present case does not involve minors,” Kennedy wrote, adding that it also was not about coerced sex or public conduct or prostitution.

Virginia courts agreed with the commonwealth’s view of Lawrence regarding minors and upheld MacDonald’s conviction. He then took his case to federal courts.

That is where the legal landscape becomes more complicated. When federal courts review appeals of state convictions, they are governed by the Antiterrorism and Effective Death Penalty Act of 1996.

It requires federal courts to defer to lower courts unless a ruling was “contrary to, or involved an unreasonable application of, clearly established federal law.” In other words, those who defend Cuccinelli contend, it must not be just possibly wrong but unreasonable.

A federal district judge thought the Virginia courts had a point about minors. The 4th Circuit panel reversed, and the full appeals court rejected Cuccinelli’s request to reconsider.

The panel decision, written by Circuit Court Judge Robert B. King, said the state wants to “wave a magic wand” and read the broad anti-sodomy law as protecting minors. But the law “does not mention the word ‘minor,’ nor does it remotely suggest that the regulation of sexual relations between adults and children had anything to do with its enactment.”

University of Richmond law professor Kevin Walsh, who closely watches the 4th Circuit, is like Dorf in thinking Cuccinelli can make a good case that the panel majority went beyond deciding whether the lower courts made an unreasonable decision.

He also thinks Cuccinelli is getting a bad rap for taking the case to the Supreme Court. “It’s really not about Ken Cuccinelli; it’s his job” to defend the state’s laws, Walsh said.

Others think Cuccinelli is on a crusade. Keeping such a broad prohibition could lead to selective prosecution, Cuccinelli’s critics say.

Slate legal commentator Dahlia Lithwick whacked Cuccinelli particularly hard, saying he was asking judges to become activists in rewriting the law to save it.

That’s something the legislature should do, and she and others have noted that when lawmakers tried to do just that several years ago, Cuccinelli as a state senator opposed the efforts.

“You can’t really stagger around swinging a huge, unwieldy legal mallet and claiming it’s the only tool you have against pedophilia. Not when you opted to turn down the offer of a scalpel,” she wrote.

Dorf said that even if Supreme Court justices think the 4th Circuit panel went too far, it doesn’t mean they will be ready to step in. Roberts’s refusal to issue a stay is one indication of that. “It’s not clear it presents an issue of national importance,” he said.

Even if the justices accept the case, it would not be argued at the court for some time. Cuccinelli might be governor by then, but he won’t be attorney general, and it will be his successor’s job to decide how far to go to try to revive Virginia’s law.