An undercover sheriff’s deputy talks to a man who pulled over to talk with her in Compton, Calif, on Nov. 15, 2017. (Reed Saxon/AP)

The Supreme Court’s 2003 ruling in the case Lawrence v. Texas is one of its best-known in recent memory. In a 6-3 decision, the justices invalidated every remaining sodomy law in the United States, rendering the country’s archaic and largely unenforced bans on same-sex sexual activity unconstitutional. “Intimate conduct” between consenting adults was a fundamental right protected by the Constitution’s due process clauses, the high court found.

How far the definition of “intimate conduct” stretched wasn’t spelled out in the ruling. But a California-based sex worker advocacy group decided to test its limits.

The Erotic Service Provider Legal Education and Research Project, or ESPLERP, filed a lawsuit in federal court in 2015 claiming that, under the Supreme Court’s ruling, California’s anti-prostitution law violates the constitutional rights of prostitutes and clients to engage in consensual sexual activity. They even went so far as to say that the ruling barred laws criminalizing prostitution among adults and that paying for sex was a form of protected commercial speech.

It was a novel argument, but not one that the U.S. Court of Appeals for the Ninth Circuit found convincing.

On Wednesday, the San Francisco-based court threw out the lawsuit, ruling that paying for sex didn’t count as the type of “intimate conduct” that Supreme Court justices had in mind.

“There is no constitutional rights to engage in illegal employment, namely, prostitution,” Judge Jane A. Restani wrote for the three-judge panel.

The lawsuit named as defendants a group of district attorneys in and around the San Francisco Bay area, as well as the attorney general of California.

ESPLERP was joined in the case by three former “erotic services providers” and a potential client, referred to in court papers only by their initials to protect their privacy. The organization’s lead attorney, Louis Sirkin, said he was considering asking for a rehearing in front of the full Ninth Circuit.

“We’re disappointed that the Ninth Circuit missed this opportunity to declare, with certainty, that the Constitution protects the right of consenting adults to engage in private sexual activity, even if they are paying for it or getting paid,” Sirkin said in a statement. “We’re mindful that, in our nation’s history, other constitutional issues have taken a persistent and continuing effort until the courts get it right.”

The plaintiffs had little chance of prevailing in the case, but the Ninth Circuit appeared to take their claims seriously. During a hearing in October, the judges suggested that California’s 1872 ban on prostitution might need closer scrutiny, as the San Francisco Chronicle reported. At one point, a judge asked why it should be “illegal to sell something that’s legal to give away,” according to the Chronicle.

The ruling parsed the plaintiffs’ arguments in detail as well, with Restani noting in some sections that the judges didn’t need to analyze certain claims in depth but did anyway.

A core issue was whether California’s anti-prostitution law violated the plaintiffs’ due process rights. The plaintiffs said it did, in light of the Supreme Court’s decision in Lawrence v. Texas.

“American courts continue to recognize that private sexual activity is a fundamental liberty interest protected by the Fourteenth Amendment to the United States Constitution,” they wrote in their initial complaint. “Yet, when the private, consensual sexual activity occurs as part of a voluntary commercial exchange between adults, the State prohibits the activity and deprives those adults of their constitutional rights.”

California’s attorneys contended that the Lawrence decision only pertained to sex as part of a personal relationship, not sex in and of itself, and that nothing in the ruling supported the notion that engaging in prostitution was a right.

The Ninth Circuit noted that while “the bounds of Lawrence’s holdings are unclear,” the case didn’t cover prostitution.

The court conducted what’s known as a “rational basis review” of the anti-prostitution statute, meaning it examined whether the anti-prostitution law had a legitimate purpose, then asked whether the law promoted that purpose.

The prostitutes’ claims fell short on both questions, the Ninth Circuit found. The state had good reasons for outlawing prostitution, including discouraging human trafficking and violence against women, and the law was tailored to address those reasons, Restani wrote.

The judge acknowledged that ESPLERP had offered evidence that criminalizing prostitution put sex workers at greater risk of violence and didn’t deter the spread of disease. But that wasn’t enough, she wrote. The organization’s claims “may yet convince the California legislature to change its mind. But this court cannot change its mind for them.”

“We hold that the criminalization of prostitution is a valid exercise of California’s police power and hence, the State may criminalize prostitution in the interest of the health, safety, and welfare of its citizens,” the ruling added. “Accordingly, it is left to the political branches to fix the boundary between those human interactions governed by market exchange and those not so governed. ”

The court ruled that the relationship between a prostitute and a client doesn’t suggest anything intimate. It’s short, it’s transactional, and therefore it’s not protected as “free association” under the Constitution, according to the ruling.

Nor does prostitution qualify as free speech, the judges found. California’s law “does not violate the First Amendment freedom of speech because prostitution does not constitute protected commercial speech and therefore does not warrant such protection.”

More from Morning Mix:

Porn star Stormy Daniels’s brief political career as a U.S. Senate contender

Trump hotel reviews now flooded with a certain expletive on Yelp

During Hawaii missile alert, Honolulu Catholic bishop led a penance rite