Religious Jews attending Mets games at Citi Field on the Sabbath will have to stick to peanuts and Cracker Jacks.

A judge yesterday ruled against a vendor who made a federal case out of the team’s order that it not peddle kosher hot dogs on Friday nights and Saturdays.

Internal memos showed that team officials felt that Sabbath hot-dog sales did not cut the mustard under Jewish law and feared offending observant Jews.

The controversy has been going on for a while.

In the beginning was the contract. In 2009, Citi Field’s inaugural season, the Mets and Kosher Sports signed a pact that did not specifically address the issue — and the company set up shop in the stadium.

But soon the Mets ordered the firm not to open its hot-dog stands during Friday night and Saturday day games — when sales are especially good.

The company did as the team demanded, but also filed suit, pointing out that its contract did not specifically prohibit Sabbath sales.

And it claimed the Mets did not notify it of the prohibition until after it signed the 10-year contract.

The team countered that the deal didn’t specifically allow kosher sales on the Sabbath.

Meanwhile, the company stopped paying concession fees to the Mets that were called for in the contract.

Brooklyn federal Judge Jack Weinstein sided with the team, but decided the devil is in the details.

In a Solomon-like ruling, he asked another judge to mediate between the two sides to determine matters including what damages should be awarded to the Mets for its lost concession payments.

That judge will also try to hammer out details of the future relationship between Kosher Sports — headed by former Wall Street trader Jonathan Katz — and the team.

The dispute has been as bitter as Passover herbs.

During the many hearings, voices were raised, accusations of trickery were leveled and tempers flared during discussions about the fine points of selling hot dogs at Major League baseball games.

At one point, the case even produced something of a “Weiner-gate.”

The Mets accused Kosher Sports of secretly recording conversations between executives of stadium concessions giant Aramark — and then employing a cover-up to hide the tapes from a judge.

Aramark is technically in charge of all concessions at Citi Field, but was not a party to the suit.

Danielle Parillo, a Mets spokeswoman, said “We . . . continue to be fully committed to providing a world-class game-day experience, culinary and otherwise, for all our fans.”

Edward Normand, attorney for Kosher Sports, said he disagrees with the decision and plans an appeal.