Iran's parliament was still in session when gunmen with Kalashnikovs stormed the building and one attacker blew himself up inside, with the roar of gunfire and explosions echoing through the chamber.
Live footage showed lawmakers trapped inside seemingly calm as gun battles raged in surrounding office buildings, snipers took position on nearby rooftops, and police helicopters circled over the parliament building in downtown Tehran on June 7.
News followed of another deadly attack in Tehran at the shrine of the late Ayatollah Ruhollah Khomeini, the spiritual leader of Iran's revolution in 1979, and at least 12 people were reported dead and dozens more injured in the incidents.
Iranian state media reported that all entrances and exit gates at parliament were closed, and that lawmakers and reporters had been ordered to remain in place inside the chamber.
Then, as they awaited their rescuers and for the attack to end, several grinning lawmakers and waving journalists in the parliament took selfies that they shared on social media.
It was a notable nod to the impact of social media even in Iran, where many such networks are banned as potential Trojan horses for creeping Western culture and influence.
In one video from inside the chamber, Parliament Speaker Ali Larijani dismissed the attacks, saying they were a "minor matter" and that security forces were dealing with them.
"As you know, some coward terrorists infiltrated a building in [parliament], but they were seriously confronted," Larijani said. "This is a minor issue but reveals that the terrorists pursue troublemaking."
Lawmakers surrounding Larijani then promptly began chanting "Death to America!" -- a refrain that has routinely accompanied state-organized events and rallies, including Friday Prayers and anniversaries of the 1979 takeover of the U.S. Embassy in Tehran on the heels of the revolution that ousted the U.S.-backed Shah.
WATCH: Iran's Parliament Speaker Calls Attack 'Minor Issue'
The militant group Islamic State (IS) claimed responsibility for the attack, which along with a nearly simultaneous attack on the Imam Khomeini Shrine on the outskirts of Tehran was said to have killed at least eight people, in addition to four attackers.
If confirmed, it would mark the radical Sunni IS's first known attack inside the Shi'a-dominated Islamic republic, which has teamed up with Russia and longtime ally Syrian President Bashar al-Assad to help Damascus battle armed opponents -- including IS fighters -- in Syria.
It would also follow a ramping up of IS's propaganda efforts aimed at recruiting Iranian Sunnis to its cause.
Underlining official defiance in the face of the attacks, Mohammad Ali Jafari, the head of the powerful Islamic Revolutionary Guards Corps (IRGC), was photographed entering the parliament building as the attack reportedly continued.
After initial reports of a hostage situation, Iranian media said the assault on the parliament building was "over."