The UK embassy in the Iranian capital, Tehran, has been closed after a number of shots were fired at the building from a nearby street.
Some Iranians want the UK ambassador expelled from Tehran
A spokesman said that five shots had hit the embassy but nobody was hurt in the attack which took place just before midday local time (0730 GMT).
The official news agency Irna quoted Iranian police as saying two motor cyclists had carried out a drive-by shooting.
Foreign Ministry spokesman Hamid Reza said police had put in place special surveillance and security measures around the embassy and were following up very seriously these "irresponsible actions" against the embassy.
The incident followed the announcement that Iran had temporarily recalled its ambassador to Britain amid an escalating dispute between the two countries.
21 August: Hade Soleimanpour arrested in northern England, following a request from Argentina
24 August: Iran protests at the arrest and demands an apology
27 August: Iranian deputy foreign minister travels to London, but UK says Mr Soleimanpour's fate is a matter for the courts
3 September: Iran recalls its ambassador 'for consultations'
Iran's ambassador to Britain, Morteza Sarmadi, was recalled after allegedly failing to win concessions following the arrest of another Iranian diplomat in Britain, Hade Soleimanpour.
Mr Soleimanpour's extradition is being sought by Argentina in connection with the bombing of a Jewish centre in Buenos Aires in 1994, when he was Iranian ambassador there.
The attack on the main office building in the embassy compound was launched from nearby Ferdowsi Street on a busy working day.
The first and second floors of the building were hit, breaking windows and causing damage.
The embassy has been closed down while investigations begin.
It has been on a heightened state of alert since the current diplomatic crisis with Iran.
The BBC's Jim Muir in Tehran says the shooting will be an embarrassment to the Iranian authorities - it will also make it more difficult for them to approach London on the former ambassador's issue.
And, with ongoing US-led pressure over Tehran's alleged nuclear weapons programme, this is no time for Iran to lose friends, our correspondent says.
Relations between Britain and Iran have been strained since Mr Soleimanpour's arrest on 21 August, following an extradition request from Argentina.
The Argentine authorities believe he was involved in planning and commissioning the Jewish centre bombing, which killed 85 people.
He has strenuously denied any involvement, but has been refused bail after his arrest in Durham, where he was a research student at the city's university.
Mr Soleimanpour (right) denies any involvement in the bombing
Iranian President Mohammad Khatami has demanded Mr Soleimanpour's release and an apology from Britain.
But the British Government says it cannot intervene in what it calls a purely judicial, and not political, process.
Tehran has threatened to withdraw some of its diplomats, but not its ambassador to London, over the arrest.
There is speculation that they are considering expelling the British ambassador to Iran, our correspondent adds.
The Foreign Office in London denied that Mr Sarmadi's departure amounted to a downgrading of relations.
Britain and Iran resumed full diplomatic relations at ambassadorial level in 1999 after a long break following the overthrow of the shah in the 1979 Islamic revolution.