The European Union has defended Bahrain's violent repression of pro-democracy protesters, with the EU foreign policy chief Catherine Ashton's right-hand man downplaying the crackdown with the comment "accidents happen".

Twenty-one people have been killed and up to 100 others are still missing after King Hamad ibn Isa Al Khalifa unleashed his security forces last week, putting an end to two months of growing protests that had threatened the legitimacy of Bahrain's monarchy and stoked sectarian tensions throughout the Gulf.

The UN high commissioner for human rights, Navi Pillay, has denounced the beating of medical personnel and the takeover of hospitals by security forces.

But Robert Cooper, one of the EU's highest-ranking diplomats and councillor to Ashton on the Middle East and the Balkans, told MEPs: "I'm not sure if the police have had to deal with these public order questions before. It's not easy dealing with large demonstrations in which there may be violence. It's a difficult task for policemen. It's not something that we always get right in the best western countries and accidents happen."

Briefing MEPs after a fact-finding mission to the Gulf, Cooper stressed that two of those killed were police. He said that Bahrain, home to the US fifth fleet, is "a rather pleasant, peaceful place".

While still calling for dialogue between protesters and the government, he said: "One should understand the authorities were right to restore calm and order and that's what they've done."

He said the idea of a Shia government gave him the most concern.

"It would be a surprise to me if the Iranians had not spotted that there was an opportunity for them and had not taken some advantage of it," he added.

Europe has offered to mediate in the crisis, with Ashton's Middle East specialist, Hugues Mingarelli, suggesting the EU "play a facilitator's role in launching dialogue".

Mingarelli said: "It seems to me that this conflict, which started in the social and economic, has taken a turn more and more towards the religious, which obviously presents more difficult and sensitive issues as the regional implications are more important."

Ashton said she was convinced by the regime's offer of talks.

"The crown prince of Bahrain has appeared to put forward an interesting proposal for a dialogue to start without preconditions, that would bring in the spectrum of opinion in Bahrain and begin discussions that over time would move forward to some sort of, I don't know, possibly constitutional monarchy. But certainly he has a plan."