Protesters held after scaling Iran embassy in London
The group appear in video footage on Twitter taking down the Iranian flag and waving a blue and white replacement from the balcony for around two hours.
"We were called at 4.20 pm (1620 GMT) to reports of four protesters on the balcony of the Iranian embassy in Princes Gate, Knightsbridge," a spokeswoman for London's Metropolitan Police said.
At around 6.40 pm (1840 GMT) all four men were arrested on suspicion of criminal damage and being unlawfully on diplomatic premises.
"All four people have been taken to a central London police station. They remain there in custody," the spokeswoman said.
It is understood the protesters did not manage to get inside the building and came down voluntarily after a couple of hours. No one was reported harmed.
Iranian foreign ministry spokesman Bahram Ghasemi said Tehran had lodged a strong protest with the British government over the incident, according to the IRNA state news agency.
The report said supporters of a "Shirazi cult" living in Britain were responsible. The group were reportedly protesting the detention of the son of Grand Ayatollah Sadegh Hossein Shirazi, according to The Evening Standard.
The son of Shirazi, a religious figure and fierce critic of Iran's regime, was recently imprisoned for insulting Ayatollah Khamenei.
Iran's ambassador to the UK Hamid Baeindinejad tweeted photos of the incident adding that the group were advocates of a so-called "Shirazi cult", and that all of the embassy's staff were safe.
The blue and white flag is thought to be that of a group called Khoddam al-Mahdi, who support Ayatollah Shirazi as their supreme leader.
Iran's deputy foreign minister Abbas Araghchi made his protest known to the British ambassador in Tehran, demanding "absolute protection of our diplomats in London and immediate dealing of the police with the attackers", IRNA said.
IRNA reported that the men were armed with knives and sticks, which was not confirmed by police. Iran's English-language Press TV also reported that a religious group carried out the "attack", without giving further details.
In a statement, a Foreign Office spokesman said: "The safety and security of diplomats and diplomatic missions in the UK is of paramount importance to us."
In 1980, six gunmen who supported a dissident Iranian group took over the Iranian embassy in London, taking more than two dozen hostages.
After a six-day siege, British special forces raided the building, killing five of the gunmen and arrested another. Two of the hostages also died.