Germany has declared two employees of the Iranian embassy personae non gratae and ordered them to leave the country on Wednesday.
The decision was in protest over Iran sentencing a German national to death, a statement from the foreign office said.
Germany also summoned Iran's charge d'affaires over the issue, Foreign Minister Annalena Baerbock said in a statement, adding: "He was informed that we do not accept the massive violation of the rights of a German citizen."
"We call on Iran to revoke Jamshid Sharmahd's death sentence and provide him with a fair appeal process based on the rule of law," she added.
Sharmahd, a German-Iranian national, was sentenced to death on charges of "corruption on earth", the judiciary's Mizan news agency reported on Tuesday.
The verdict can be appealed.
Iran accuses Sharmahd, who also has US residency, of heading a pro-monarchist group accused of a deadly 2008 bombing and planning other attacks in the country.
On Tuesday, Baerbock called the sentencing "absolutely unacceptable". She said Sharmahd had been denied a fair trial and that the ministry had been refused consular access.
Tensions between Iran and the West have intensified in recent months, pushing already-stalled efforts to revive talks on Tehran's nuclear program further into the background.
Germany has been a vocal backer of EU sanctions against Iran over its crackdown on protesters in the country. The bloc plans to widen the measures to include Iranian actors involved in the Russian war in Ukraine.
Report by Reuters