An Iranian official says 12 people have been killed in twin attacks on the Iranian parliament and Ayatollah Ruhollah Khomeini's shrine.
The head of Iran's emergency department, Pir Hossein Kolivand, said 39 people were also wounded in the June 7 attacks in Tehran, and rescue operations were continuing.
It is not clear whether the attackers were included in the death toll.
The extremist group Islamic State (IS) claimed responsibility for the attacks, the IS-affiliated Amaq news agency said, marking the first time the Sunni militant organization has claimed responsibility for an attack in Shi'ite-majority Iran.
The attacks began midmorning, when officials said assailants dressed as women and armed with Kalashnikov rifles entered the parliament building through the main entrance.
"One of them was shot dead and another one detonated his suicide vest," Deputy Interior Minister Mohammad Hossein Zolfaghari said, according to the semiofficial Tasnim news agency.
IS published a video purporting to show gunmen inside the building and a man wearing a bloody shirt lying on the floor in an office.
After an hourslong siege that ended with four attackers dead, Iranian media reported that the assault on the parliament building was over.
There were earlier reports of a hostage situation.
The situation was also calm at Khomeini's mausoleum in southern Tehran, which had been targeted by a suicide bomber and other assailants.
Press TV reported that three attackers had been arrested.
One assailant detonated a suicide vest, another was killed by the security forces, and the rest of the attackers were arrested, Tehran Governor Hossein Hashemi was quoted as saying by state broadcaster IRIB.
PHOTO GALLERY: Terror In Tehran: Islamic State Claims Deadly Attacks In Iranian Capital (click gallery to open)
The two attacks occurred at about the same time and appeared to be coordinated, reports said.
Iran's Intelligence Ministry said the attacks were carried out by "terrorist groups."
"Members of a third group were arrested before being able to carry out any attack," state TV quoted the ministry as also saying.
The speaker of Iran's parliament, Ali Larijani, said the "coward terrorists...were seriously confronted," according to the state-run IRNA news agency.
"This is a minor issue but reveals that the terrorists pursue troublemaking," Larijani added.
The attacks come less than a month after President Hassan Rohani, a relative moderate in a country where ultimate power is held by Supreme Leader Ayatollah Ali Khamenei, convincingly won a second term in a May 19 election.
The Kremlin condemned the attacks in Tehran, saying that "the continuation of a series of terror attacks again underlines the need for coordinated actions in the fight against terror and IS."
With reporting by Reuters, AP, AFP, and Tasnim