UPDATE 1-Germany sells sub to Israel but warns on attacking Iran
* Germany to deliver 6th Dolphin submarine to Israel
* Berlin warns Israel would be detrimental to attack Iran
* German budget dedicates 135 mln euros to Israeli defence (Adds background, details)
BERLIN, March 20 (Reuters) - Germany said on Tuesday it will sell Israel a sixth military submarine and shoulder part of the cost, although it warned its ally that any military escalation with Iran could bring incalculable risks.
German Defence Minister Thomas de Maiziere said he shared Israel's fear of a nuclear-armed Iran and he was convinced Tehran aimed to make nuclear weapons, but he called for caution.
"I recommend all sides show urgent restraint, both in their rhetoric and their action. A military escalation would bring incalculable risks for Israel and the region, to the detriment of Israel," he told reporters at a press conference in Berlin with his Israeli counterpart Ehud Barak.
Barak by contrast said all options regarding Iran should remain on the table, apart from containment. "To accept a nuclear Iran would be inconceivable and unacceptable to the whole world," he said.
Germany, which after the Nazi-perpetrated Holocaust is absolutely committed to Israel's security, has championed international diplomatic campaigns to rein in Tehran. But Berlin has also criticised Israel's settlement-building programme.
"Israel can be sure of German solidarity in questions of its sovereign integrity and its existence ... but it is important that Israel and its partners make moves towards a solution of the Middle East conflict," de Maiziere said.
Israel operates three German-built Dolphin submarines, manufactured by Howaldtswerke-Deutsche Werft (HDW), a unit of ThyssenKrupp Marine Systems, and expects delivery of two more shortly. The vessels are considered a vanguard against foes like Iran.
Israel is threatening to take military action, with or without U.S. support, if Iran is deemed to be continuing to defy pressure to curb its nuclear projects. Iran insists its nuclear energy programme is purely non-military.
The Dolphins are small, diesel-powered submarines, designed for coastal patrols and equipped with 10 torpedo tubes.
Israel is widely assumed to have the Middle East's only nuclear weapons, which it neither confirms nor denies. These could be onboard the Dolphins.
Israel's purchase of a sixth submarine had been widely expected, although discussions over the degree of Germany's contribution drew out the process.
"A further boat will be delivered to Israel and there will be financial help. It is part of the budget and is therefore a public action," de Maiziere said.
Germany's state budget for 2012 foresees spending of 135 million euros for "defence systems for Israel", 70 million euros of which will fall this year.
Germany delivered the first three submarines between 1999-2000, two of which it paid for outright. In 2005 Germany struck a deal with Israel on another two submarines, this time paying a contribution of 333 million euros for both, amounting to about a third of the cost. (Reporting by Alexandra Hudson; Editing by Susan Fenton)