While the internet is busy dissecting Sen. Ted Cruz’s possible interest in voyeuristic online porn clips, it’s worth pointing out that the conservative Republican has been a strict moralist when it comes to even private sexual behavior, including masturbation.

In 2007, when Cruz served as attorney general of Texas, his legal team filed a 76-page brief defending a state law that sought to ban the sale of dildos and sex toys — which the brief described as “obscene devices,” according to Mother Jones.

The brief, filed with the Fifth Circuit Court of Appeals, asserted that Texas had a “government” interest in “discouraging … autonomous sex” — a fancy legalistic term for masturbation.

Also Read: Ted Cruz-ing for Porn? Senator's Twitter Account 'Likes' Explicit Video

In addition, Cruz’s office argued that the state had “police-power interests” in “discouraging prurient interests in sexual gratification, combating the commercial sale of sex, and protecting minors.” Violators of the Texas law faced up to two years in prison if convicted.

Furthermore, Cruz’s office asserted, “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.”

So much for life, liberty and the pursuit of happiness.

Also Read: MSNBC's Katy Tur Blasts Ted Cruz for Hurricane Hypocrisy: 'It's Not Political Sniping' (Video)

The Appeals Court rejected the argument, in a 2-1 decision in 2008 citing the Supreme Court’s landmark 2003 decision, Lawrence v. Texas, that struck down another Texas law, against sodomy. Cruz flirted with challenging the ruling to the Supreme Court but ultimately let the matter drop.

Craig Mazin, Cruz’s former Princeton roommate and a frequent critic during the senator’s failed 2016 presidential bid, tweeted his surprise at Cruz’s attempt to legislate self-pleasure: “This would be a new belief of his.”

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. — Craig Mazin (@clmazin) April 13, 2016

Cruz’s views have come under greater scrutiny after his official Twitter account on Monday liked a NSFW clip from @SexuallPosts that begins with a blonde mom walking in on two “teenagers,” um, expressing their love for one another.

Also Read: Alyssa Milano Shows Ted Cruz Who's the Boss by Denying Him a Hug

Early on Tuesday, Cruz senior communications adviser Catherine Frazier tweeted an inevitable explanation: “The offensive tweet posted on @ tedcruz account earlier has been removed by staff and reported to Twitter.”

Naturally, Twitter didn’t let Cruz — a married father of two who joined Republicans last year in declaring pornography “a public health crisis that is destroying the life of millions” — off the hook for this.