(CNN) -- A Swedish diplomat in Iran was arrested and accused of participating in Iranian protests during observances surrounding the Muslim holy day of Ashura, two semi-official news agencies reported Sunday, citing members of Iran's parliament.
Sweden denies that the diplomat was involved in the protests.
Swedish officials and the Mehr news agency reported that the diplomat was subsequently released.
"Based on the law and international norms, diplomats cannot be detained or arrested," Alaedin Boroujerdi, a member of the Iranian parliamentary National Security Committee, told Mehr. "But since this person was among those who were disturbing the peace, he was initially arrested but then he was released when it was determined he was a diplomat."
The Swedish Foreign Office confirmed the arrest, but said the diplomat -- who was not named -- was not taking part in demonstrations.
"A Swedish diplomat was arrested in Tehran about two weeks ago and detained overnight for between 10 and 20 hours before being released," said Anders Jorle, spokesman for the Foreign Office. "He was arrested after he was found to not be carrying ID, which is not required but is recommended in Iran."
"He was not taking part in a protest," Jorle said. "He was passing one of the places where a protest had taken place, but the protest was not ongoing at the time of the arrest.
"In hindsight, we would say that he should have been carrying ID," Jorle said. "As far as we're concerned, the matter is closed and there is nothing further to say."
The Fars news agency quoted Zohreh Elahian, a member of the security committee, as saying the Swedish chargé d'affaires was arrested on the day of Ashura, December 27. He was arrested by Iranian officials who considered his presence at the demonstration to be an interference in international affairs, Elahian told Fars.
"According to witnesses and evidence, several foreign embassies in Tehran played a role behind the scenes and were represented [on the scene on that day] by their chargés d'affaires and other diplomats," Elahian said.
Ashura is the major Shiite Muslim holy day. It marks the death of Imam Hussein, grandson of the Prophet Mohammed, as a martyr. Shiites commemorate the death of Hussein each year, climaxing on Ashura, after a 40-day mourning period.
Its observance in Iran was marked by anti-government protests. President Mahmoud Ahmadinejad downplayed the reports, calling them "a theater play by the Zionists and the Americans," according to state media.
An Iranian media blackout made it difficult to verify accounts of that weekend's violence, but videos that found their way west depicted bloodied and, in some cases, apparently dead protesters.
CNN's Jonathan Wald contributed to this report.