Newly released CCTV footage has shown a stampede forming when ISIS-backed gunmen burst into a waiting room in Iran's parliament building.

The video showed terrorists storming through what appears to be a seated public area on Wednesday.

The gunmen are brandishing pistols and Kalashnikov AK-47 assault rifles as they stride through the room, sending terrified men and women fleeing.

Four gunmen, apparently dressed as women, stormed the main gate of the Parliament building in central Tehran and opened fire, reports CNN.

Moments later two others began a shooting rampage and suicide bombing targeting the Ayatollah Khomeini mausoleum about 25kms away.

The six terrorists were shot dead by Iran's Revolutionary Guards but the attack left at least 12 people killed in what was the first ISIS-backed assault in the Islamic country.