Getting your Trinity Audio player ready...

Snack-food giant Frito-Lay has settled its legal skirmish with Chicago-based Jays Foods over ads claiming that Chicagoans prefer Lay’s potato chips over rival Jays.

A Frito-Lay spokesman said Monday that the terms were confidential, but industry sources indicated that Frito-Lay agreed not to run any comparative ads with Jays for two years and to pay Jays’ legal fees in the court battle.

Word of the settlement came as Frito-Lay also issued a public apology after two Chicago radio stations inadvertently aired the ad on Monday in violation of a court order.

In a strongly worded decision last month, a federal judge in Chicago found Frito-Lay’s ad campaign misleading and issued a temporary restraining order requiring the company to take down a downtown billboard and halt radio advertising.

U.S. District Judge Samuel Der-Yeghiayan took Frito-Lay to task for labeling its chips as “classic” and Jays as “unflavored” during taste tests at three suburban malls in December, calling that an attempt to manipulate results.

“I find Lay’s misleading advertisement in identifying Jays potato chips as unflavored not only unsavory but totally tasteless,” the judge said in making the ruling.

Der-Yeghiayan had scheduled a hearing for Thursday to decide whether to make the restrictions permanent, but the settlement makes that unnecessary.

Charles Nicolas, a spokesman for Plano, Texas-based Frito-Lay, said Chicago radio stations WBBM-FM and WCKG-FM–both owned by Infinity Broadcasting Corp., a subsidiary of Viacom Inc.–mistakenly aired the comparative ad on Monday.

“Frito-Lay has again instructed its agents to make sure that no such advertisements air,” the company said in a statement.

Frito-Lay’s agreement is unusual, given that advertisers mainly self-regulate. Most companies refrain from agreeing to ban specific messages and settle most squabbles concerning comparative advertising out of court.

But marketing executives say that Frito-Lay may have figured that it could afford the ban on comparative advertising because of its overwhelming market share and its dominant advertising budget.

Jays wasn’t the only smaller potato-chip company targeted by the Frito-Lay’s ads.

The company took out similar taste-test comparison ads in several other markets, including New York, Philadelphia and Boston, attacking smaller, privately owned companies that have sizable market shares and long histories with consumers there.

The ads have sparked complaints and threats of lawsuits by some companies in those cities as well

Marketing experts say that Frito-Lay’s strategy may have backfired with some consumers who may have been turned off by the perception that a behemoth was taking on a smaller local institution.

Most companies prefer to fight turf battles on the grocery shelf rather than in public, where it’s easy to alienate consumers who may perceive companies to be too aggressive.