Iranian Foreign Minister Mohammad Javad Zarif and his German counterpart, Heiko Maas, hold a news conference June 10 in Tehran. (Tasnim News Agency/Reuters) (Handout/Reuters)

BERLIN — When Iranian Foreign Minister Mohammad Javad Zarif faced questions from foreign journalists on Monday in Tehran after a meeting with his German counterpart, Heiko Maas, he may have expected some uncomfortable questions.

But in a country that imposes severe punishments including the death penalty for gay sex, the question he may have struggled with most was asked by Paul Ronzheimer, a Berlin-based chief correspondent with Germany’s largest tabloid, Bild. “Why are homosexuals executed in Iran because of their sexual orientation?” Ronzheimer asked, according to Germany’s public broadcaster. His question triggered an audible uproar among his Iranian colleagues but also appeared to surprise Zarif, Ronzheimer recalled in an interview Wednesday.

Not only was Zarif standing next to the foreign minister of Germany, a country that has legalized same-sex marriage, but also the question itself was being asked by a reporter who could face punishment in Iran for his sexual orientation.

His American boyfriend in Berlin, Ronzheimer said, had helped him refine his question in English before the news conference.

Ronzheimer did not reveal his own sexuality to the Iranian foreign minister, but the journalist acknowledged that posing the question proved to be unusually personal for him: “I think I had a bit of a shaky voice toward the end.”

In his response to Ronzheimer’s question, the Iranian foreign minister did not directly deny that gay people have been executed in the country and instead cited a need to respect “moral principles,” according to a transcript of his translated remarks provided by Bild. The response was not included in a subsequent news release by the Foreign Ministry, and there appeared to be no public video recording of it.

The Permanent Mission of Iran to the United Nations in New York did not immediately respond to a request for comment.

In an interview Wednesday with Deutsche Presse-Agentur, the German news agency, the U.S. ambassador to Germany, Richard Grenell, cited the exchange in Tehran to accuse Iran of violating “basic principles of the United Nations.” Grenell is openly gay and has made the decriminalization of homosexuality one of his priorities.

The U.S. Embassy in Berlin did not immediately respond to a request for comment.

Iran’s judicial system is often opaque, and the details of individual cases can be difficult to ascertain. But international human rights groups say the country has a pattern of “unfair” trials and a history of executing Iranians for gay sex. Official punishments for some same-sex relationships range from the death penalty to floggings for less severe violations such as kissing. Women found guilty of violating the country’s sharia laws prohibiting homosexuality risk being flogged, too.

It is unclear how many Iranians have been sentenced under those laws since the Islamic revolution in 1979.

Often, Iranian courts cite gay sex as one among several reasons for a death sentence, with male rape being another offense punishable by death in Iran. But human rights groups have raised doubts over such charges and have cautioned that some Iranians may have faced the death penalty merely based on their sexuality. In other cases, rights groups have voiced concerns that officials may have added gay-sex charges to humiliate straight criminals.

Read more:

Here are the 10 countries where homosexuality may be punished by death