The Japanese Embassy in Tehran said Sunday that Ambassador Hiroyasu Kobayashi was briefly detained and questioned in a raid by security forces in April and that a protest had been lodged with the Iranian Foreign Ministry.

While the reason for the raid remained unclear, the incident could amount to a violation of diplomatic immunity, which guarantees that foreign diplomats cannot be arrested or detained.

Since last year's landmark nuclear deal between moderate-leaning President Hassan Rouhani and the West, numerous individuals in the country with contacts to the United States and Europe have been detained by hard-line opponents of the deal.

There are growing fears that foreign nationals living in Iran are now being targeted for harassment.

According to the embassy, the incident happened on the evening of April 28 when Kobayashi and his wife attended a dinner hosted by a local acquaintance. In total dozens of people, including other foreign diplomats, attended the event at which alcohol was served. Alcohol consumption is banned in Iran, although its consumption is widespread.

Midway through the dinner, security authorities burst in and prevented attendees from leaving the venue as well as using their mobile phones.

At that time, Kobayashi was not carrying a photo identification card known as a "diplomatic card" issued by the Iranian Foreign Ministry. He instead showed off his personal business card, which was ignored, and was questioned.