At least 12 people have died in twin attacks in Tehran on Wednesday, the head of Iran's emergency department, Pir-Hossein Kolivand, was quoted as saying by state broadcaster IRIB.
Iran's state-run IRNA news agency had earlier said two security guards were killed and more than 30 people wounded in attacks on the parliament building and the shrine of Ayatollah Ruhollah Khomeini.
Assailants armed with Kalashnikov rifles stormed the parliament building Wednesday and one of the attackers blew himself up inside, where a session had been in progress. Another group of attackers, including a second suicide bomber, struck the shrine.
The Islamic State group claimed the attacks, its first ever carried out in Iran. The Sunni militant group is at war with Iran-backed forces in Syria and Iraq, and views Iran's Shia majority as apostates deserving of death.
An official at Khomeini's mausoleum in south Tehran said "three or four" people had entered via the western entrance and opened fire, killing the gardener and wounding several people, according to the Fars news agency.
Fars said a female suicide attacker blew herself up outside the shrine and published photos showing the explosion.
Four men armed with rifles and a pistol were reported to be inside the parliamentary complex, around 20 kilometres away (12 miles) in the centre of the city.
Tasnim news agency said one of the men had later left the building and was firing in the street, but was forced back inside by police fire.
News agencies ISNA and Fars had earlier said three people had been shot after the gunmen entered via the north entrance, including at least one security guard.
The ILNA news agency said security forces were dismantling a bomb inside the Khomeini shrine and that firing was still going on around the site.
It was not clear if the assailants had been able to enter the actual mausoleum.
The city was on lockdown, with streets blocked and the metro closed, and journalists kept away from the shrine by police.
Interior Minister Abdolrahman Fazli told ISNA he had convened a special meeting of the country's security council.
Iran has been singled out as a target by jihadist groups, including IS, but has largely escaped attacks within its urban centres.
Iran, the predominant Shia power, has been helping both Iraq and President Bashar al-Assad's regime in Syria to battle the Sunni extremist group.
IS is under increasing pressure in both countries, having lost significant territory in the face of offensives now targeting its last two major urban bastions, Raqa in Syria and Mosul in Iraq.
IS published a rare video in Persian in March, warning that it "will conquer Iran and restore it to the Sunni Muslim nation as it was before."
IS and other extremists consider Shias to be apostates, and the video accuses Iranians of persecuting Sunnis over the centuries and into modern times.
Militant groups are also known to operate in Iran's southeastern Sistan-Baluchistan province, which borders Pakistan and has a large Sunni community.
Jaish-ul Adl (Army of Justice), which Tehran accuses of links with Al-Qaeda, has carried out several armed attacks inside Iranian territory in recent years.
Iran's supreme leader Ayatollah Ali Khamenei said on Sunday that attacks by IS in Europe and elsewhere showed that Western policies in the Middle East have backfired.
"This is a fire that (Western powers) themselves ignited and now has backfired on them," he told a gathering of senior officials in Tehran.