WASHINGTON — The Navy is going to sea for the first time with a laser attack weapon that has been shown in tests to disable patrol boats and blind or destroy surveillance drones.

A prototype shipboard laser will be deployed on a converted amphibious transport and docking ship in the Persian Gulf, where Iranian fast-attack boats have harassed American warships and where the government in Tehran is building remotely piloted aircraft carrying surveillance pods and, someday potentially, rockets.

The laser will not be operational until next year, but the announcement on Monday by Adm. Jonathan W. Greenert, the chief of naval operations, seemed meant as a warning to Iran not to step up activity in the gulf in the next few months if tensions increase because of sanctions and the impasse in negotiations over the Iranian nuclear program. The Navy released video and still images of the laser weapon burning through a drone during a test firing.

The laser is designed to carry out a graduated scale of missions, from burning through a fast-attack boat or a drone to producing a nonlethal burst to “dazzle” an adversary’s sensors and render them useless without causing any other physical damage.