JERUSALEM — By the there-will-be-mud standards of Israeli politics, the end stage of this third campaign season in less than a year had been unexceptional, with the usual last-minute rumors, sexual innuendo and doctored videos.

But even Israelis have been shocked by the spate of tit-for-tat secret recordings that rocked the two leading candidates — Prime Minister Benjamin Netanyahu and his chief rival, Benny Gantz — on the final weekend of campaigning, a jaw-dropping run of dirty tricks that featured backstabbing aides and a double-agent rabbi.

On Thursday night, an Israeli television stationed aired a recording of Israel Bachar, Gantz’s chief campaign strategist, talking candidly to Tel Aviv rabbi Guy Habura. Bachar, who seemed to be speaking his own mind and quoting others, derided Gantz as a danger to Israel and said he did not believe Gantz would have the courage to attack Iran, according to Israeli media reports.

“She says he’s stupid, a total loser, and must not become prime minister,” Bachar was heard saying, quoting Omer Yankelevitz, a lawmaker from Gantz’s Blue and White party.

Members of Netanyahu’s Likud party repeated and retweeted the Gantz-bashing quotes with gusto. Blue and White blamed Netanyahu for the leak but subsequently fired Bachar.

Two nights later, however, another broadcast carried another clandestine recording, this time of Natan Eshel. In it, the longtime adviser and former chief of staff to Netanyahu paints a less-than-flattering portrait of Likud’s strategy, saying it was motivating the party’s supporters by using “hate.” The tactic worked particularly well with “non-Ashkenazi Jews,” or Sephardic Jews of non-European descent, Eshel is heard saying.

“Non-Ashkenazim hate everything,” he is heard saying in the recording.

Eshel went on to describe Culture Minister Miri Regev, a Jew of Moroccan heritage and a staunch Netanyahu ally, as an “animal” who helped whip the Likud supporters into the desired frenzy.

Netanyahu disavowed the comments. Tweeting after the recording was aired Saturday, the prime minister wrote: “I called and made it clear to Natan Eshel that his words were unworthy and unacceptable to me. He apologized for his remarks immediately. The Likud is the home of all parts of Israeli society and will always remain so.”

But there was another recording to come. Netanyahu had been asked directly in several television interviews Saturday whether he had anything to do with the recording of Gantz’s campaign consultant unburdening himself with a rabbi. The prime minister steadfastly maintained that he had no role in it.

And then Sunday, hours before polls opened — another recording emerged. This time, Netanyahu can be heard on a conference call with Habura and others discussing plans to release the Bachar audio, in a recording obtained by Channel 12 investigative journalist Ilana Dayan. Asked Monday to comment, Netanyahu suggested that it was more important to remember what Bachar had said about his own boss.

Meanwhile, Blue and White said Monday that it was filing a complaint with election officials, charging Likud with editing one of Gantz’s campaign videos to make it appear as if the candidate was beseeching voters not to vote for his party. And a few days earlier, vaguely sourced allegations resurfaced that Iran possessed a blackmail-ready sex tape of Gantz, a charge he has repeatedly dismissed as a smear.

It was all a bit much for many Israelis, who are tired of the endless politicking. Among those who sounded fed up Monday was President Reuven Rivlin.

“This is normally a festive day, but the truth is that I don’t feel celebratory,” Rivlin told reporters after casting his ballot. “We don’t deserve another awful and grubby election campaign like the one that ends today.”