Chancellor Helmut Kohl's government also expelled four unnamed Iranian diplomats from Germany. Officials said Germany was ending its "critical dialogue" with Iran - a policy that stressed cautious co-operation rather than confrontation - for the foreseeable future.
Iran's foreign ministry rejected the Berlin court's ruling as inspired by "counter-revolutionary elements" and "hostile Zionist propaganda". However, Iranian opposition leaders in exile hailed the judgment as a devastating blow to the Iranian government's reputation.
The court said that a "Committee for Special Operations" in Tehran had approved the September 1992 killings at a Greek restaurant in Berlin. Crucially, it declared that the committee's members included Iran's president and paramount spiritual leader.
Although the court avoided naming names, it was unmistakably pointing an accusing finger at President Ali Akbar Hashemi Rafsanjani and Ayatollah Ali Khameini. Iran's intelligence chief, Ali Fallahiyan, for whom German prosecutors have issued an arrest warrant, was also implicated by the court in the murders.
Judge Frithjof Kubsch imposed life sentences on Kazem Darabi, an Iranian living in Berlin, and Abbas Rhayel, a Lebanese, for what the prosecution argued were cold-blooded contract killings. Two other Lebanese men, Youssef Amin and Mohamed Atris, were jailed for 11 years, and five years and three months respectively.
Sadegh Sharafkandi, the exiled leader of the Iranian Democratic Party of Kurdistan, two other party activists and a translator were shot dead when a masked hit squad opened fire with automatic weapons at the Mykonos restaurant in Berlin. "The Iranian political leadership ordered this crime," Judge Kubsch said.
His ruling lent weight to the view, passionately held by the United States, that Iran's Islamic leaders have long been sponsors of international terrorism. The US State Department was quick yesterday to praise the court's judgment as courageous and objectively fair.
Germany and other European Union countries had defended their "critical dialogue" with Iran on the grounds that US allegations of Iranian state terrorism rested on uncertain evidence. Germany has an interest in not falling out completely with Iran because it is Iran's biggest Western trading partner.
EU foreign ministers are to meet in Brussels on 29 April and could impose economic sanctions on Iran. However, the diplomatic expulsions suggest that Germany places a higher priority on evicting alleged undercover intelligence agents from the Iranian embassy in Bonn, which is believed to serve as Tehran's European headquarters for espionage and operations against Iranian opposition movements.
Despite the row, both the German government and the opposition Social Democrats want to avoid a full break in diplomatic relations with Iran. Likewise, Iran's leaders value their ties with Germany and may limit their protests at the court's judgment.
The ayatollah indicated his desire to limit the damage late last year, when he told Iranians that the US and Israel, not Germany, were Iran's biggest enemies.