This week, London Gatwick, Britain’s second-busiest airport, had to be shut down after unmanned aerial vehicles (UAVs) entered its airspace in what police called a “deliberate act.” Some 10,000 passengers were diverted, hundreds of flights were delayed, and chaos reigned on the ground. The army had to be called in.

Worldwide, drones are proliferating madly. That’s mostly a good thing: In addition to hobbyists, they’re now being used by filmmakers and farmers, police officers and firefighters, utilities, insurers, retailers and more. The best uses probably haven’t occurred to anyone yet.

As this week’s debacle shows, however, UAVs can also cause mayhem. As the world grapples with the phenomenon, for better and worse, a few principles are worth keeping in mind.

One is that rules help. Britain has already enacted some sensible restrictions, including prohibiting drones from flying above 400 feet or near airports. Although imperfect, this is the right way to get the attention of careless hobbyists: Violations can result in fines or jail time.

Those intent on doing serious harm — as the Gatwick perpetrators seemed to be — make for a much harder problem. But here, a second principle is useful: Focus on technology, as the market is already doing. Experiments in drone defense have ranged from low-tech (birds, nets) to futuristic (lasers, more drones). In recent years, the U.K. has used radio jamming to prevent UAVs from delivering drugs to prison inmates. Drone-detection technology — including electrooptic sensors, thermal imagers, acoustic detectors and more — is getting more sophisticated.

In time, and with some forethought, drones may come to resemble many other worries of the digital age: a problem, but a manageable one.