Image copyright JOHN F WILLIAMS / US Navy Image caption The Laws laser weapon was deployed for tests aboard a US Navy ship in 2014

The UK Ministry of Defence has officially awarded a £30m contract to produce a prototype laser weapon.

The aim is to see whether "directed energy" technology could benefit the armed forces, and is to culminate in a demonstration of the system in 2019.

The contract was picked up by a consortium of European defence firms.

The prototype will be assessed on how it picks up and tracks targets at different distances and in varied weather conditions over land and water.

Peter Cooper, from the UK's Defence Science and Technology Laboratory (DSTL), headquartered at Porton Down, Wiltshire, said the project "draws on innovative research into high power lasers so as to understand the potential of the technology".

He added that this could "provide a more effective response to the emerging threats that could be faced by UK armed forces".

The MoD has been finalising the agreement with the consortium, called UK Dragonfire, for several months, but it has now formally announced them as the winning contractor.

'Ahead of the curve'

A spokesperson for the MoD told BBC News that the demonstrator was not being developed to counter any specific threat, but to assess whether such weaponry could be delivered as a capability for the armed forces.

But in general, directed energy weapons could potentially be used to destroy drone aircraft, missiles, mortars, roadside bombs and a host of other threats.

The US military has been experimenting with high energy lasers for decades. But, until recently, technical hurdles had prevented them from being used on the frontline.

However, the US Navy fielded a laser weapon system called Laws for testing on the USS Ponce during a deployment to the Gulf starting in 2014.

It hit targets aboard a small boat which was directed to speed towards the navy ship and also shot a small drone out of the sky.

The Minister for Defence Procurement, Harriet Baldwin, said that "truly ground-breaking projects like the Laser Directed Energy Weapon" would "keep this country ahead of the curve".

If the demonstration is successful, the first laser weapons could come into service in the mid-2020s.

The UK Dragonfire consortium comprises the companies MBDA, Qinetiq, Leonardo-Finmeccanica GKN, Arke, BAE Systems and Marshall ADG.

Follow Paul on Twitter.