By Will Weissert and Michael Biesecker, Associated Press

AUSTIN, Texas (AP) — Defending a Texas state law banning the sale of sex toys, Republican presidential candidate Ted Cruz argued in a 2007 court brief that individuals have no legal right to use them, even in the privacy of their own bedrooms.

Prior to becoming a U.S. senator, Cruz was for more than five years Texas' solicitor general, arguing the state's legal positions in court. He often cites that experience to burnish his credentials as a Christian conservative.

On the campaign trail, Cruz frequently reminds audiences that he used the job to defend capital punishment and oppose abortion, while preserving the words "Under God" in the Pledge of Allegiance and defending a monument to the Ten Commandments on the state Capitol grounds.

But Cruz makes no mention of a decade-old case he lost — his defense of Texas' sex-toy ban. The story was first reported by Mother Jones magazine.

The law, approved in the 1970s, banned as obscene any device "useful primarily for the stimulation of human genital organs." The same law also declared that anyone possessing six or more such items was presumed to be promoting sex-toy usage through manufacture, sale, lending, delivery or other means.

Joanne Webb, a 43-year-old mother of three and former fifth-grade teacher, was arrested in 2003 after selling a sex toy to an undercover police officer during a gathering of adult couples similar to a Tupperware party held at a home in a Fort Worth suburb.

Though the criminal charges against Webb were eventually dropped, a collection of sex-toy companies sued in federal court to challenge the constitutionality of the state's ban.

A three-judge panel of the U.S. District Court of Appeals later ruled (pdf) that the Texas law violated 14th Amendment privacy rights. Then-Texas Attorney General Greg Abbott, now the state's Republican governor, unsuccessfully appealed, asking the full appeals court to review the case.

As solicitor general Cruz co-wrote an 83-page brief arguing that the U.S. Supreme Court "has never suggested that the substantive-due-process doctrine ensures individuals' ability to stimulate their genitals in ways that are neither connected to procreation nor associated with any particular lifestyle."

In an interview Friday night on New York's WABC radio, Cruz was asked if he would ban the sale of sex toys if he became president.

"Look, of course not, it's a ridiculous question, and of course not," Cruz responded. "What people do in their own private time with themselves is their own business and it's none of government's business."

Cruz campaign spokeswoman Alice Stewart noted in an email that as solicitor general, Cruz had an obligation to defend Texas' laws in court, regardless of whether he agreed with them.

"Senator Cruz personally believes that the Texas law in question was, as (Supreme Court) Justice (Clarence) Thomas said in another context, an 'uncommonly silly' law," Stewart said. "But the office was nevertheless duty-bound to defend the policy judgment of the Texas Legislature."

Cruz defended the Texas ban as "protecting public morals — discouraging prurient interests in sexual gratification" and argued that in doing so the state had a vested moral interest in discouraging "autonomous sex."

Cruz's brief also suggested that the legal sale of sexual enhancement drugs such as Viagra was different because it can't be described as a "device." Couples, even married ones, willing to use sex toys may also "believe that hiring a willing prostitute or engaging in consensual bigamy would enhance their sexual experiences," Cruz warned.