The Navy plans to install a laser-weapon prototype on a ship this summer for at-sea testing in the Persian Gulf.

The technology, the Laser Weapon System, will be the first of its kind to be deployed, the Navy said.

The idea is that the laser could zap dangerous swarming small boats and flying drones while on the USS Ponce in the Persian Gulf.

Its power also can be scaled down, presenting the Navy a nonlethal alternative to ward off threats such as pirates, terrorists and smugglers.

“This is a revolutionary capability,” Chief of Naval Research Rear Adm. Matthew Klunder said in a recent statement.

Developed by engineers and scientists from the Navy, defense industry and academia, it involves commercial fiber solid-state lasers and has already successfully shot down flying targets.

The Navy plans to spend $110 million with Northrop Grumman, BAE Systems and Raytheon over the next two years for development work on the program.

The announcement to deploy the laser comes as military researchers continue to try to make progress on directed-energy weapons.

In 2012, the Laser Weapon System downed several drones in tests.

In 2011, the Navy had success with another laser system mounted on a warship when it fired and set ablaze an empty motorboat as it bobbed in the Pacific Ocean.

However, the Missile Defense Agency’s airborne laser program involving a Boeing 747 jumbo jet equipped with an advanced tracking system and a massive laser gun on its nose was canceled after more than 15 years of development and $5 billion in federal funding because of cost overruns and delays.