Germany opposes Egypt's use of the death penalty, recently imposed on Islamist leaders including former President Mohamed Morsi, but is ready to do business with Cairo, Chancellor Angela Merkel said on Wednesday.
She was speaking at a joint news conference with Egyptian president Abdel Fattah al-Sisi which ended with a protester shouting out "he is a murderer!".
Sisi's first official visit to Germany has proved controversial, with Bundestag President Norbert Lammert announcing last month that he would not meet the former army chief, citing "an unbelievable number of death sentences".
Egyptian authorities have cracked down hard on opponents including the Muslim Brotherhood and secular and liberal groups since Sisi toppled elected Islamist president Morsi in 2013 after mass protests against his rule.
Wednesday's meeting in Berlin came a day after an Egyptian court postponed issuing a final ruling over a death sentence recommendation for Morsi and other top Brotherhood leaders.
German police separated around 100 pro-Sisi protesters from some 50 anti-Sisi demonstrators outside the chancellery, where Merkel said the two had discussed economic and security issues.
Merkel told the news conference there were many good reasons for close ties between Germany and Egypt, such as a common interest in achieving security and peace.
"(But) there are things where we have a different opinion," she said. "That includes, for example, that under no condition should people be sentenced to death, even if it concerns terrorist activity.
"I think that if one wants to be partners and solve complex issues, we have to be able talk about these things … this doesn't mean that we can't work very, very closely on other issues," she added.
German industrial group Siemens expects to sign a multi-billion euro deal with Egypt to supply gas and steam power plants.
Egyptian activists say political dissent is being stifled as officials from former autocrat Hosni Mubarak's police state are gradually rehabilitated. Egypt's government says it is committed to the country's democratic transition.
"Chancellor Merkel spoke with me about the death sentences," Sisi said. "We respect the Egyptian judiciary and according to the Egyptian constitution we cannot comment on the rulings or discuss their verdicts."
As Merkel and Sisi wrapped up their news conference, a woman protester wearing a headscarf shouted the anti-Sisi slogan. She was swiftly led away by security, while Egyptian journalists cried out: "Long live Egypt!"