European Union members are threatening the collective withdrawal of their ambassadors from Iran to secure the release of the British embassy employees being held by the authorities.

EU diplomats said tonight all the envoys could be recalled "temporarily" in solidarity with staff from the British mission in Tehran who have been accused – entirely falsely, UK officials insist – of involvement in protests over the "stolen" presidential election.

Five of the nine Iranians, who were arrested on Saturday, were freed today, but four others, understood to be the most senior, were still being questioned. None of them have been named.

As the row with Britain continued, Iran's guardian council, the country's top legislative body, confirmed Mahmoud Ahmadinejad's victory in the disputed poll after a partial recount, finally dashing hopes of a different outcome.

Gordon Brown underlined concern over the embassy incident when he called it unacceptable and unjustifiable that the employees were being held. The prime minister was speaking in London alongside the European commission president, José Manuel Barroso, who expressed full solidarity with the UK.

Yesterday, EU foreign ministers warned Iran that any "harassment or intimidation" of embassy staff would be met with a "strong and collective" response. Most of the 27 EU member states have their own ambassadors in Tehran.

Silvio Berlusconi, who will next week host a meeting of the G8 rich nations said todaythat they would discuss sanctions against Iran. Asked about sanctions, he replied that Iran "will be the first issue we will deal with".

Diplomats said it had not been agreed when the EU envoys would be recalled, or for how long. But the threat is clearly intended to signal seriousness of intent to the Tehran authorities in the hope they will back down.

Iran's foreign ministry had earlier appeared to respond to the warning by saying it did not wish to damage or downgrade relations with the UK, after a telephone conversation yesterday between David Miliband, the foreign secretary, and his Iranian counterpart, Manuchehr Mottaki. Miliband had demanded the immediate release of the embassy staff.

But the fear in London is that the foreign ministry is not in control, with regime hardliners from the interior ministry and intelligence service calling the shots as part of a campaign to pin the blame for the unrest on foreign governments.

Last week, as the trouble continued, Iran expelled two British diplomats – the embassy's second and third secretaries – in protest at what it called their undiplomatic approach. That prompted the expulsion of two diplomats from Iran's London embassy.

The guardian council's recount of 10% of votes has always been treated with scepticism by opposition supporters and foreign observers. Mir Hossein Mousavi, who says he beat Ahmadinejad, demanded an annulment of the 63%-34% result, which he says was rigged.