Ted Cruz
Ted Cruz is trailing Donald Trump in the race to become the Republican presidential candidate Reuters

US presidential candidate Ted Cruz has come under scrutiny after it emerged that he supported a ban on the sale of sex toys while he was solicitor general of Texas. The 45-year-old, who is trailing Donald Trump in the race to be the Republican nominee in the November general election, was behind a 76-page brief that argued the case for outlawing the sale of so-called "marital aids" in the state in 2007.

The brief was filed at the US Court of Appeals after two sex toy companies challenged a state law that barred the sale of adult devices on penalty of up to a two-year prison sentence.

Cruz's legal team contended that the use of sex toys was comparable to "hiring a willing prostitute or engaging in consensual bigamy", and that advertising the sale of such products was akin to promoting prostitution, according to Mother Jones.

"There is no substantive due-process right to stimulate one's genitals for non-medical purposes unrelated to procreation or outside of an interpersonal relationship," they argued.

The document filed by Cruz's office added that there was a government interest in discouraging "autonomous sex" to protect "public morals".

Ted Cruz
Cruz was solicitor general of Texas from 2003 to 2008 Reuters

The argument was ultimately thrown out by the court, which asserted that the state government's jurisdiction did not extend to people's bedrooms.

"The case is not about public sex. It is not about controlling commerce in sex. It is about controlling what people do in the privacy of their own homes because the state is morally opposed to a certain type of consensual private intimate contact," the judges said in their ruling.

Hollywood screenwriter Craig Mazin, a roommate of Cruz at Princeton University, hinted that the Texas senator's opposition to adult devices and masturbation was likely a recent development.

He wrote on Twitter: "Ted Cruz thinks people don't have a right 'to stimulate their genitals'. I was his college roommate. This would be a new belief of his."