Islamic State has claimed responsibility for an attack at Iran's parliament and mausoleum that has reportedly killed at least twelve people and injured many more.

The attacks were the first claimed IS inside the Shi'ite Muslim country.

Quoting on the ground sources, Tasnim news agency has reported that gunmen stormed the building in Tehran.

"I was inside the parliament when shooting happened," one journalist, who asked not to be named, said.

"Everyone was shocked and scared. I saw two men shooting randomly."

It's understood that assailants, armed with a pistol and two with AK-47 assault rifles, burst into Tehran's parliament building and the mausoleum of revolutionary founder Ayatollah Khomeini, politician Elias Hazrati told state television.

State media reports that there has been at least one suicide bombing.

View photos

At least seven people are dead. Photo: Twitter

*Video captures sound of gunshots*

About five hours after the first reports, Iranian news agencies said four people who had attacked parliament were dead and the incident was over.

Meanwhile, a woman has also been arrested after a bomb attack and shooting spree at the Ayatollah Khomeini shrine south of the city, the semi-official Fars news agency reports.

The news agency reported that a second attacker was surrounded by security officers.

That attack occurred at the same time as the shooting in the Iranian parliament.

An apparently coordinated attack took place at the mausoleum, several news agencies said.

View photos

According to media reports, armed men opened fire at the Iranian parliament and at the shrine of Ayatollah Khomeini in the capital Tehran. Photo: AAP

An armed man had entered at the western entrance of the mausoleum and opened fire before blowing himself up with a suicide vest, the site's head of public relations Ali Khalili told the IRNA news agency.

The mausoleum is in southern Tehran, around 20 kilometres from the parliament building.

Shi'ite Iran has been singled out as a target by Sunni jihadists, including the Islamic State group, but has largely escaped attacks within its urban centres.

Iran provides key ground forces against IS and other rebel groups in Syria and Iraq.