Nineteen sailors have been killed and 15 others injured in an accident involving Iranian naval vessels in the Gulf of Oman, Iran's navy has said.
Iranian media reported that the support ship Konarak was hit by a new anti-ship missile being tested by the frigate Jamaran during an exercise on Sunday.
The Konarak had been putting targets out in the water and remained too close to one, according to the reports.
The navy said the ship was towed ashore and that an investigation had begun.
The incident took place near the Strait of Hormuz, a strategically important waterway through which about a fifth of the world's oil passes.
"On Sunday evening... during naval exercises performed by a number of the naval force's vessels in the waters of Jask and Chabahar, an accident happened involving the Konarak light support ship vessel, causing the martyrdom of a number of brave members of the naval forces," the navy said in a statement on Monday.
The statement added that the Konarak had been taken to a port for "technical inspection", but it made no reference to the circumstances of the accident.
The Iranian armed forces are no strangers to error.
In January, an air defence unit fired two surface-to-air missiles at an unidentified target, bringing down a Ukrainian airliner and killing all those on board. That mistake came at a time of heightened tension, with the Iranians expecting a retaliatory US missile strike.
But Sunday's incident took place in very different circumstances - a planned naval exercise - and raises all sorts of questions about command and control and the professionalism of the Iranian navy.
Iran is seeking to broaden the sphere of its naval operations and to upgrade its warships' armament. The frigate Jamaran is part of a new class of home-built vessels intended to set a new course for Iran's navy.
But it remains, to some extent, an over-looked service. It is the Revolutionary Guards' flotilla of fast patrol boats that seem to figure most prominently in Iranian efforts to harass and monitor US and other shipping in the Gulf.
Iranian media earlier reported the Konarak had been accidentally struck by an anti-ship missile fired by the Jamaran during an exercise near the port of Jask.
"The vessel was hit after moving a practice target to its destination and not creating enough distance between itself and the target," state television reported on its website.
State broadcaster Irib posted video footage of the aftermath of the incident on Twitter. It showed significant damage to several structures on the deck of the Konarak and black smoke rising from them.
It is not clear how many sailors were on board at the time.
The commanders in chief of the Iranian army and the Islamic Revolution Guard Corps, Maj Gen Abdolrahim Mousavi and Maj Gen Hossein Salami, expressed their condolences to the families of the sailors who died.
The Konarak is a 47m (154ft) long Hendijan-class logistical support vessel that was made in the Netherlands and bought by Iran before the 1979 Islamic Revolution.