Iran warned Tuesday that it will prosecute five detained British sailors if it is proven they had intentions to violate the national security” of Iran.

The judiciary will decide about the five ... naturally our measures will be hard and serious if we find out they had evil intentions, Esfandiar Rahim-Mashaie, the president's chief of staff, told the semi-official Fars news agency.

 Relations between Britain and Iran have been dogged by tension in recent years over a range of issues, from Tehran's nuclear program to Iranian allegations of British involvement in post-election violence in June this year.

 There is certainly no question of any malicious intent on the part of these five young people, British Foreign Secretary David Miliband told BBC television.

I think it is important to say there is no link at all between the position of the yachtsmen and the Iranian nuclear file or other political issues that exist between Iran and the international community, Miliband said.

The Kingdom of Bahrain yacht had been heading to join the 360-mile Dubai-Muscat Offshore Sailing Race, which was to begin Nov. 26, according to the Web site of its owner Sail Bahrain.

Iran's English-language state Press TV said the Britons were detained kilometers away from their claimed route of Bahrain to Dubai. They were detained near the Iranian island of Siri, Press TV said.

Iranian Supreme Leader Ayatollah Ali Khamenei called Britain the most treacherous of Iran's enemies after Prime Minister Gordon Brown condemned Tehran's violent suppression of protests that followed the disputed June presidential election.

 British media identified the five sailors as Oliver Smith, Sam Usher, Luke Porter, Oliver Young and David Bloomer.

Mr. Miliband on Tuesday insisted that the five Britons were civilians who were going about their sport, saying, we look forward to the Iranian government dealing with this promptly, he said.