TEHRAN - Iran released five Britons detained in the Gulf after their yacht apparently strayed into Iranian waters, Britain said Wednesday, averting a diplomatic row on top of Iran's disputes with the West over its nuclear program.

One of the five yachtsmen, David Bloomer, said afterwards they had been treated well after straying into Iranian waters unawares because of a breakdown.

We're all very well, we've been very well treated, Bloomer told Bahrain Radio as the men sailed towards Dubai.

Britain and Iran are at loggerheads over Iran's nuclear program, which Washington and its European allies fear is a cover to build bombs. Iran insists its nuclear work is aimed at generating power to meet booming domestic demand.

Hardline President Mahmoud Ahmadinejad accused Britain on Tuesday of tainting the tranquillity of Iran's talks with six major powers over its nuclear activities, state television reported.

Foreign Secretary David Miliband said he had received confirmation that the men were heading towards international waters on the way to Dubai.

I welcome the fact that this has been dealt with in a professional and straightforward way by the Iranian authorities. As I said yesterday this is purely a consular case, he told reporters.

Britain had stressed the five men, detained on November 25, were civilians and called for their speedy release. A senior Iranian official warned Tuesday that Iran would take serious measures against the five if it proved they had evil intentions.

After getting necessary guarantees, Iran released the five, state radio quoted the elite Revolutionary Guards as saying. We reached the conclusion that they entered Iran's territorial waters by mistake.

Iran's Foreign Ministry said the detention of the five Britons was not politically motivated.

Britain exaggerated about the detention of the five. They wanted to use this case to pressure Iran, Foreign Ministry spokesman Ramin Mehmanparast told the semi-official Mehr news agency.

Miliband agreed there had been no wider significance.

It was never a political matter and I welcome the fact that they've dealt with it in this professional way. It shows that diplomacy can work, he said.

Iran also accuses the West, particularly Britain and the United States, of fomenting unrest in the Islamic state after its June 12 presidential election. London and Washington deny the allegation.

The vote returned the hardline Ahmadinejad to power by a large margin, his reformist opponents cried foul and thousands of Iranians took to the streets in the biggest anti-government protests in the 30-year history of the Islamic Republic.

The election dispute also exposed deep rifts within the normally opaque political and religious establishment.

Three Americans who crossed into Iran from Iraq in July are still in detention and face spying charges. Their families say they were hiking and strayed across the border accidentally.
Iran seized eight British Royal Navy sailors and seven marines off its coast in 2007. They were released after 15 days.

(Additional reporting by Reza Derakhshi and Michael Holden in London and Frederik Richter in Bahrain; writing by Parisa Hafezi; editing by Tim Pearce)