Armenia expressed solidarity with neighboring Iran on Wednesday as it rushed to condemn deadly attacks on the Iranian parliament and Ayatollah Ruhollah Khomeini's shrine in Tehran that were claimed by the so-called Islamic State (IS).

“We strongly condemn attacks at Iran’s Parliament and Mausoleum of Ayatollah Khomeini,” Foreign Minister Edward Nalbandian said in a statement posted on his ministry’s Twitter page. “In solidarity with people of Iran.”

Armenia’s President Serzh Sarkisian and parliament speaker Arar Babloyan were also quick to condemn the attacks in letters of condolence sent to their Iranian counterparts.

“Attaching importance to security and stability in the neighboring and friendly country, I am confident that the Iranian authorities are taking all necessary measures to prevent such actions,” Sarkisian wrote to President Hassan Rouhani.

Iran's state-run IRNA news agency reported that two security guards were killed and more than 30 other people wounded in the twin attacks. Other reports said later in the day that as many as 12 people were killed.

At least three attackers raided Khomeini's mausoleum in southern Tehran and shot at visitors to the shrine, Iranian media said. One assailant detonated a suicide vest, another was killed by security forces, and the rest of the attackers were arrested, Tehran Governor Hossein Hashemi was quoted as saying by state broadcaster IRIB.

The extremist Sunni group IS claimed responsibility for the twin attacks in the capital of predominantly Shi'ite Iran, according to the IS-affiliated Amaq news agency.

Armenia’s Embassy in Iran urged Armenian nationals to stay away from the scenes of the violence as well as Tehran’s underground system, markets and other crowed places. “The Embassy is monitoring the course of events,” it said in a statement. “Additional information will be provided if necessary.”

Armenia has long maintained close relations with Iran, one of the landlocked South Caucasus state’s two commercial conduits to the outside world. Sarkisian expressed confidence that bilateral ties will deepen “in all areas” when he congratulated Rouhani on winning a second term in a presidential election held last month.