The semi-official Tasnim news agency has since reported that security forces had neutralized all the assailants.
Four gunmen were involved in the attack on parliament, the IRNA news agency reported, citing Iranian lawmaker Qolam-Ali Jafarzadeh Imenabadi.
Three guards were reportedly injured when the attackers, armed with Kalashnikov assault rifles and a handgun, opened fire inside the assembly building.
Imenabadi was quoted as saying that at least one guard had been killed in the ensuing exchange of fire.
The Fars News Agency, meanwhile, reported that five people had been killed -- and at least 10 injured -- in the parliament attack.
The attackers also took four people hostage on the upper floors of the parliament building, Tasnim reported.
The news agency, which put the death toll from the parliament attack at seven, also published an image of an alleged attacker displaying a hostage from a window.
In a simultaneous attack to the south of Tehran, four attackers opened fire at a shrine dedicated to Ayatollah Khomeini, the founder of the Islamic republic, Fars reported.
According to that news agency, one person was killed and several more wounded in a bomb and gun attack.
Fars reported that three attackers had opened fire on visitors at the shrine, while a fourth had blown himself up outside a police station across from the site.
The same news agency added that one attacker had committed suicide by swallowing a cyanide pill, while a female terrorist had been captured by the authorities.
Ali Khalili, an official at the shrine, told IRNA that an “armed man” had blown himself up outside the mausoleum.
Security forces at the shrine, meanwhile, said they had defused another suicide vest at the scene.
Local media is reporting that the Daesh terrorist group had claimed responsibility for the attack through its Amaq website.
Russia 'resolutely' condemns deadly attacks in Iran
Moscow voiced Wednesday "readiness" to take further joint action against terrorism with Tehran following the deadly twin attacks targeting Iran’s parliament and the shrine of Ayatollah Khomeini.
President Vladimir Putin conveyed condolences to his Iranian counterpart Hassan Rouhani in a telegram, the Kremlin said in a statement.
"The head of the Russian state resolutely condemned these crimes, which had once again corroborated the need to step up international cooperation in fighting terrorism, and confirmed Russia’s readiness for further joint actions with its Iranian partners in this area," the statement said.