BERLIN (AP) — German officials confirmed Wednesday that a court has ordered the release of an Iranian man wanted by the United States, but declined to comment on reports that the move was part of a prisoner swap with Iran.

The United States was seeking the extradition of Ahmad Khalili, arrested in Germany in 2018, in connection with alleged violations of U.S. sanctions against Iran. Khalili, who worked for Iran’s government-controlled Meraj Air, is alleged to have procured Cessna planes and parts for delivery to Iran.

“We are very glad that a German citizen was released from Evin prison in Tehran following intense diplomatic and humanitarian efforts and has returned safely to Germany,” a spokeswoman for the German foreign ministry, Maria Adebahr, told reporters in Berlin.

Adebahr declined to provide details of the case, citing “privacy protection.”

A spokesman for the Iranian judiciary, Gholamhossein Esmaili, said the German had been jailed for taking photos and videos of restricted areas in Iran.

Asked about the release of Khalili, Adebahr confirmed that the German government had made an official statement as part of the legal proceedings against Khalili, but declined to say whether it had supported the Iranian’s release.

A spokesman for Frankfurt’s regional court said judges had ruled Khalili’s extradition to the U.S. was permissible last year, but that the German government hadn’t provided the approval necessary for this to occur. The court then decided that it wouldn’t be proportional to detain Khalili any longer, “despite the flight risk,” and ordered him released Feb. 12, spokeswoman Gundula Fehns-Boeer told The Associated Press.

Khalili returned to Iran on Sunday, according to Esmaili.

Germany informed U.S. authorities of Khalili’s release during last weekend’s Munich Security Conference, attended by U.S. Secretary of State Mike Pompeo and German Foreign Minister Heiko Maas.