The creators of the hit crime drama “Better Call Saul” on Monday won the dismissal of a defamation and trademark infringement lawsuit by Liberty Tax Service for depicting a shady fictional tax firm that appeared to resemble its own.

U.S. District Judge Paul Gardephe in Manhattan ruled in favor of AMC Networks AMCX.O and Sony Pictures Television 6758.T over the depiction of “Sweet Liberty Tax Services” in an April 2022 episode.

Gardephe said Liberty Tax offered no “particularly compelling” allegations that viewers would be confused into thinking Sweet Liberty was one of its more than 2,500 offices.

“Better Call Saul” starred Bob Odenkirk as Saul Goodman, a corrupt lawyer also known as Jimmy McGill.

The disputed episode “Carrot and Stick” showed Sweet Liberty in a trailer in the New Mexico desert, using an inflatable Statute of Liberty and American flag motif, and run by former Goodman clients Craig and Betsy Kettleman to skim tax refunds.

In a 30-page decision, Gardephe said that to the extent the defendants used Liberty Tax’s trademarks, it was to advance the plot, not for marketing purposes or to disparage the Virginia Beach, Virginia-based company.

“The Kettlemans’ use of plaintiff’s trade dress is a gaudy and shabby appropriation of patriotic imagery that highlights their hypocrisy and the tawdry nature of their crimes, all of which has genuine relevance to [the] story,” the judge wrote.

Gardephe distinguished the case from hip-hop duo Outkast’s use as a “marketing tool” of civil rights activist Rosa Parks’ name to title a 1998 song that had nothing to do with her.

An appeals court revived Parks’ trademark claim, and the case later settled.

Peter Siachos, a lawyer for Liberty Tax, said his client will explore its legal options, including an appeal or refiling the lawsuit in a state court.

AMC’s and Sony’s lawyers did not immediately respond to requests for comment. Both said their use of Sweet Liberty was protected by the U.S. Constitution’s First Amendment.

“Better Call Saul” was a prequel to the series “Breaking Bad.” It ran for six seasons, ending in August 2022.