A federal judge in Pennsylvania tossed out a defamation lawsuit against Bill Cosby on Thursday, ruling that the allegations in the suit "do not support a claim for defamation" according to state law.

Renita Hill, 48, who is from the Pittsburgh area, filed the civil suit late last year, claiming that the comedian and his representatives defamed her in the media with their denials when she went public with allegations that Cosby had drugged and sexually assaulted her.

Hill argued in her lawsuit that Cosby suggested she was a "liar" and an "extortionist."

U.S. District Judge Arthur Schwab sided with Cosby, ruling the comedian's statements were "pure opinion" protected by the First Amendment and were "a far cry" from calling Hill — or other women who had made similar claims — those things, according to the ruling.

The judge ruled the case was dismissed with prejudice, preventing Hill from amending it and filing again.

The defamation suit — which claimed Cosby defamed Hill, cast her in a false light and caused her emotional distress — stemmed from three statements made by Cosby, his wife and his attorney at the time.

In 2014, when numerous women publicly alleged that Cosby had sexually assaulted them, the comedian denied the allegations, telling Florida Today that "a guy doesn't have to answer to innuendos. People should fact-check. People shouldn't have to go through that and shouldn't answer to innuendos."

Also that day, Cosby's then-attorney Martin Singer said in a statement to The Washington Post that the claims were "unsubstantiated, fantastical stories about things they say occurred 30, 40, or even 50 years ago."

Then Cosby's wife, Camille, criticized the media for publishing stories about the sexual assault allegations without first "vetting" the accusers. "An accusation is published," she said, and "immediately goes viral."

On Thursday, the judge in the case ruled that those three statements did not amount to defamation.

In response to Cosby's comments, the judge said Pennsylvania law stipulates that remarks must have a general tendency to cause harm to a person's reputation in order to be considered defamatory.

“It is not sufficient if the words are merely embarrassing or annoying to plaintiff,” he wrote.

He added that Singer's statement was "purely an opinion proffered by an attorney who, while actively engaged in the zealous representation of his client, did not cross the line." And he said Camille Cosby's remarks were targeted more toward the media than the women who accused Cosby of sexual assault.

"Even considering these three statements together as a combined, single statement, this newly 'conjoined' statement does not lead to an inference that plaintiff is a 'liar and an extortionist,' " the judge wrote.

Hill's lawyer, George Kontos, said he plans to appeal the decision.

"Obviously we are disappointed," he said, according to USA Today.

He argued the remarks contained "innuendo and undisclosed facts" that suggested the women were liars.

"We remain committed to pursuing these claims and to having our day in court," he said.

Cosby's attorney, Monique Pressley, said in a statement to USA Today that his legal team is "gratified."

"In particular," Cosby's attorneys said, "we note that the court found opinionated speech by a defendant's attorney is protected and not actionable as defamatory, and that none of the facts alleged by plaintiff supported her claims for defamation, false light or intentional infliction of emotional distress under Pennsylvania law."

A separate defamation lawsuit stemming from sexual-assault allegations was filed against Cosby in 2014 in Massachusetts by several women who claimed that after they went public with their accusations, he defamed them by calling them liars, according to an order from U.S. District Court in Massachusetts.

Cosby counter-sued, saying the "malicious, opportunistic, false and defamatory accusations" were merely a way to extort him and ruin his reputation. Bill and Camille Cosby were set to be deposed this year.

Cosby was arrested and charged last month in a criminal case in Pennsylvania involving Andrea Constand, a former Temple University employee who claimed he drugged and molested her at his Philadelphia home more than a decade ago. The charges were filed just days before the statute of limitations expired.

Cosby was released on $1 million bail.

This post has been updated.