The public brouhaha between the prime minister and his predecessor deepened Sunday, with Ehud Olmert accusing Benjamin Netanyahu of buying an unneeded submarine for an attack on Iran that will never happen.

Olmert said Israel’s purchase of a 500-million-euro, Dolphin-class submarine from Germany a year earlier, the country’s sixth, had been done against the advice of the security community, which said it was unnecessary.

“This was a megalomaniacal purchase that was done on a whim,” Olmert told participants in a conference in the Jordan Valley.

The purchase of Israel’s fleet of Dolphin submarines, which currently numbers four, with another two under construction, was partially subsidized by Berlin. According to foreign media reports, the subs can carry nuclear weapons.

The charges came two days after Olmert accused his successor of wasting NIS 11 billion (a little under $3 billion) on what he called “harebrained adventures” to thwart Iran’s nuclear ambitions.

Channel 2 diplomatic correspondent Udi Segal, citing sources close to Olmert, reported that the former prime minister accused Netanyahu of diverting funds from other anti-Iran projects to prepare an unnecessary attack plan. Netanyahu denied the accusation, saying that he actually increased the budget, according to Segal.

In an interview given to Channel 2 News on Friday, Olmert said Netanyahu’s plans “haven’t, and won’t, come to fruition.”

Netanyahu, who earlier denied the claims, struck back at Olmert during the cabinet meeting Sunday morning, telling gathered ministers that the former prime minister was the one who had wasted money.

“In contrast to governments that invested billions in the disengagement, we invested billions in fortifying our strength so as to ensure the security of Israel’s citizens,” Netanyahu said, referring to Israel’s 2005 pullout from the Gaza Strip, which Olmert oversaw as finance minister.

The attack from Olmert is evidently timed to coincide with the run-up to the Knesset elections, slated for January 22.

Olmert, who is fighting corruption charges, is not running, but his Kadima party is expected to fare poorly at the polls. Preempting a likely counter volley from Netanyahu and his Likud-Beytenu slate, Olmert said the prime minister should accept dissenting voices.

“The time has come to stop with this hypocrisy; it’s not possible that democracy is one big song of praise to the regime, a regime that is running in a wanton way,” he said. “These elections were called to avoid passing a budget, and nobody is talking about the wasting of money. It was clear to me that Likud would say that I’m waging an irresponsible war.”