The European Union's envoy to Iran talks, Enrique Mora, says he was "retained" by German police at Frankfurt airport on his way back from Tehran.
"Retained by the German police at the Frankfurt airport on my way to Brussels, back from Teheran. Not a single explanation," Mora tweeted on Friday.
"An EU official on an official mission holding a Spanish diplomatic passport. Took out my passport and my phones," he said.
A short time later he added: "Now released along with my two colleagues, the EU Ambassador to UN Vienna and the head of the EEAS Iran task force."
The EEAS is the European External Action Service, the EU equivalent of a foreign ministry, with its own diplomats.
"We were kept separated. Refusal to give any explanation for what seems a violation of the Vienna Convention," Mora complained.
An EU spokesman tried to play down the incident, which he said was "solved quickly" but which Mora had declared "seems a violation of the Vienna Convention" on diplomatic protection.
The Vienna Convention on Diplomatic Relations grants legal privileges to diplomats and diplomatic missions, and is one of the treaties that underpins all international relations.
Asked about the incident, EU foreign policy chief Josep Borrell refused to explain the reasons for the detention, only saying "the issue is over, he took the plane and is travelling in accordance with his mission".
Mora had been in Tehran on Wednesday for talks with Iran's chief negotiator on efforts to salvage a nuclear deal which has been on life support since the US withdrawal in 2018 and its subsequent coercive measures against the Islamic Republic.
For years Iranians have been subject to detention and mistreatment at European airports. On occasions Iran's civilian flights have been denied fuel at European cities, fearing US retribution.
The Islamic Republic has berated Europe's failure to fulfill its obligations under the nuclear agreement, including protecting Iran from the US sanctions.
Mora's detention at Frankfurt airport reveals the extent to which the West's policy has gone awry.
It also explains Iran's predicaments in Vienna talks, which are currently stalled. Throughout the negotiations, Iranian negotiators have been insisting on getting firm guarantees for a proper implementation of the nuclear agreement.
Borrell said the latest visit by Mora had "gone better than expected" and expressed optimism about negotiations.
"The negotiations had stalled and now they have been reopened," Borrell told reporters on the sidelines of a G7 meeting in Germany. "There is a perspective of reaching a final agreement."
Mora held two days of meetings with Iran's chief negotiator Ali Bagheri in Tehran this week.
Among the main sticking points in the negotiations has been the US refusal to undo its past wrongs, including removing Iran's Islamic Revolution Guards Corps from its blacklist.
Borrell said "these disagreements” had hampered progress in the talks for two months.