BERLIN (AP) — A German court ruled Thursday that Kuwait’s national airline didn’t have to transport an Israeli citizen because the carrier would face legal repercussions at home if it did.

The Frankfurt state court noted in its decision that Kuwait Airways is not allowed to have contracts with Israelis under Kuwaiti law because of the Middle Eastern country’s boycott of Israel.

The court said it didn’t evaluate whether “this law make sense,” but that the airline risked repercussions that were “not reasonable” for violating it, such as fines or prison time for employees.

An Israeli citizen, who was identified in court papers as Adar M., a student living in Germany, sued Kuwait Airways after it canceled his booking for a flight from Frankfurt to Bangkok that included a stop-over in Kuwait City.

The cancellation came a few days before M.’s scheduled departure in August 2016 when he revealed he had an Israeli passport. The airline offered to book him on a nonstop flight to Bangkok with another carrier.

The man refused the offer and filed the lawsuit, seeking compensation for alleged discrimination. He also insisted the airline should have to accept him as a passenger.

The court rejected his discrimination claim ruling that German law covers discrimination based on race, ethnicity or religion, but not nationality.

Germany’s Central Council of Jews condemned the ruling, calling it “unbearable that a foreign company operating based on deeply anti-Semitic national laws is allowed to be active in Germany.”

Frankfurt Mayor Uwe Becker expressed a similar view.

“An airline that practices discrimination and anti-Semitism by refusing to fly Israeli passengers should not be allowed to takeoff or land in Frankfurt,” Becker said.

Courts in the United States and Switzerland previously have ruled in favor of plaintiffs in comparable cases, the German news agency dpa reported.

A lawyer for the Israeli passenger called the verdict “deeply shocking.”

“This is an embarrassing ruling for democracy and for Germany,” lawyer Nathan Gelbart said. “It cannot be allowed to stand like this.”