Image copyright PA

UK drone users may have to pass online safety tests under legislation being introduced to the Commons on Wednesday.

Restrictions around airport boundaries have also been clarified stopping any drone flying within 1km of them.

The changes, which are set to come into effect between July 2018 and November 2019, follow a rise in the number of drone near-misses with aircrafts.

Aviation Minister Baroness Sugg said the measures were needed to "protect" aircraft and their passengers.

In addition to the safety tests, people who own drones weighing 250g or more will have to register with the Civil Aviation Authority (CAA).

Some drones, usually cheaper models, weigh less than 250g. But most - especially those with built-in cameras - weigh more.

Before, the regulations had applied to aircraft that weigh 20kg or less.

All drones will also be banned from flying above 400ft (121.9m), a rule which had been mentioned previously in the CAA's Drone Code but will now be enshrined in law.

Media playback is unsupported on your device Media caption How drones could help save lives at sea

Users who fail to adhere to the flight restrictions could face unlimited fines, up to five years in prison, or both.

Owners of drones over 250g, who do not register with the CAA or complete the safety test, could be fined up to £1,000.

How often are drones involved in aircraft incidents?

By BBC Reality Check

The number of aircraft incidents involving drones has grown dramatically in the past few years. In 2013 there were zero incidents, but that grew to almost 100 last year.

Civilian drones have grown increasingly popular as their price has fallen. Technological improvement has meant components are smaller, faster and cheaper than ever before.

The UK Airprox Board assesses incidents involving drones and keeps a log of all reports.

In one incident last year, for example, a pilot flying over Manchester saw a red "football-sized" drone passing down the left hand side of the aircraft.

In another incident, a plane leaving Glasgow narrowly missed a drone. The pilot, in that case, said the crew only had three seconds of warning and there was "no time to take avoiding action".

There were 89 incidents involving aircraft and drones in the UK in 2017 - a 25% increase on the previous year.

A report by PricewaterhouseCoopers released this week estimated drones could add £42bn to the UK economy by 2030 - and Baroness Sugg stressed the government was keen not to stunt the growth of the sector.

She added, however, that it was important to "ensure drones are used safely and responsibly".

Chris Woodroofe, chief operating officer at Gatwick Airport, said the changes should leave "no doubt" that drones must be kept "well away from aircraft, airports and airfields".

The number of active commercial drone licences in the UK increased from 2,500 to 3,800 in 2017.