As countries around the world are putting more electric vehicles on the road, they’re also struggling to power those engines. For now, countries are focusing on adding charging stations, but in the future there may be a more mobile option available to drivers: flying drones that come to you.

In early October, the US Patent and Trademark Office granted Amazon the patent for developing a drone that can connect to transfer electricity to a car in motion. Amazon filed the application in 2014, the patent document showed. The patent approval was first reported by Greentech Media.

In a nutshell, when the vehicle is low on battery, it will contact a central server, which communicates with the car to figure out the amount of energy needed for its intended destination before sending out an unmanned flying machine with some form of battery to service the car. Several authentication steps would required to prevent malicious use, according to the filing. The new patent might go well with an earlier Amazon application that envisions recharging stations on top of public street lights for flying drones to use themselves.

In May, NextEV, a San Jose-based subsidiary of China’s EV maker NIO, also filed a patent application in the US for a similar idea.

Obtaining a patent is one thing, but getting a drone in the field is another, especially with a series of US regulations that limit flying heights and areas for drones. Amazon and NIO didn’t immediately respond to Quartz’s queries about their filings.

Earlier this year, a group of Stanford scientists demonstrated that it was possible to wirelessly transfer electricity to a nearby moving object—in their case, an LED lightbulb. But that experiment involved the transfer of a 1-milliwatt charge, far from the tens of kilowatts required for fueling an electric car.

The patent filings come as the world looks set to face a growing need for charging stations. The US saw 130,000 new electric cars hit the road in 2016, while the country had only around 16,000 public charging stations as of June. China, the world’s biggest EV market, saw some 336,00 new electric car registrations last year, and had around 150,000 public charging stations by the end of 2016.

The drone-pumping electricity idea could also be a time saver. Tesla’s Supercharger, which the company claims to the be world’s fastest charging station, can refill a Model X or Model S in about 30 minutes. But the majority of public charging stations in the US are much slower—only 13% are high voltage and can refill a battery within half an hour. Not to mention, all these require a vehicle to be stationary for the duration.