The four were arrested on suspicion of causing criminal damage and being unlawfully on diplomatic premises, a spokeswoman for London’s Metropolitan Police said.
No one was hurt during the incident and the four were arrested when they came down voluntarily after around three hours.
Iran’s ambassador to Britain, Hamid Baeidnejad, tweeted that the assailants were “advocates of the Shirazi cult” and had replaced Iran’s national flag with that of their group. He said all staff at the embassy were safe.
Shi’ite cleric Grand Ayatollah Sadegh Hossein Shirazi, whose son was recently arrested for insulting Iran’s Supreme Leader Ayatollah Ali Khamenei, has been a fierce critic of Iran’s clerical leadership.
Iranian state television quoted a Foreign Ministry spokesman as saying that Deputy Foreign Minister Abbas Araqchi had protested about the incident to the British ambassador in Tehran.
“Britain is responsible for the safety of Iranian diplomats,” said the spokesman, Bahram Qasemi.
Iran’s state news agency IRNA said the attackers had carried knives and sticks. Iran’s English-language Press TV said a religious group was behind the attack, without elaborating.
Images posted on social media showed four men in black attire on the balcony of the embassy, waving a blue and white flag.
In 1980, gunmen seized the embassy to try to secure the release of Iranian political prisoners. One hostage was killed in the five-day siege, and another died when British commandos stormed the building, killing all but one of the gunmen.