Wal-Mart Stores Inc. applied Monday to U.S. regulators for permission to test drones for home delivery, curbside pickup and checking warehouse inventories, a sign it plans to go head-to-head with Amazon in using drones to fill and deliver online orders.

The world’s largest retailer by revenue has for several months been conducting indoor tests of small unmanned aircraft systems – the term regulators use for drones – and is now seeking for the first time to test the machines outdoors. It plans to use drones manufactured by China’s SZ DJI Technology Co Ltd.

In addition to having drones take inventory of trailers outside its warehouses and perform other tasks aimed at making its distribution system more efficient, Wal-Mart is asking the Federal Aviation Administration for permission to research drone use in “deliveries to customers at Walmart facilities, as well as to consumer homes,” according to a copy of the application reviewed by Reuters.

The move comes as Amazon.com Inc, Google and other companies test drones in the expectation that the FAA will soon establish rules for their widespread commercial use. FAA Deputy Administrator Michael Whitaker said in June that the agency expected to finalize regulations within the next 12 months, faster than previously planned. Commercial drone use is currently illegal, though companies can apply for exemptions.

The FAA will review Wal-Mart’s petition to determine whether it is similar enough to earlier successful applications to be fast-tracked, or whether it would set a precedent for exemptions, requiring regulators to conduct a detailed risk analysis and seek public comment, agency spokesman Les Dorr said. The FAA normally aims to respond to such petitions in 120 days.

Amazon has said it would be ready to begin delivering packages to customers via drones as soon as federal rules allow.

Wal-Mart spokesman Dan Toporek said the company would move quickly to deploy drones depending on its tests and regulations.

“Drones have a lot of potential to further connect our vast network of stores, distribution centers, fulfillment centers and transportation fleet,” he said. “There is a Walmart within five miles of 70 percent of the U.S. population, which creates some unique and interesting possibilities for serving customers with drones.”

Finding ways to more efficiently warehouse, transport and deliver goods to customers has taken on new importance for Wal-Mart, which this month projected a surprise decline in earnings next year as it copes with costs to increase wages, beat back price competition and boost online sales.

In the FAA application, Wal-Mart said it wanted to test drones for taking stock of trailers and other items in the parking lot of a warehouse using electronic tagging and other methods. A Wal-Mart distribution center could have hundreds of trailers waiting in its yard, and a drone could potentially be used to quickly account for what each one is holding.

The retailer also wants to test drones for its grocery pickup service, which it has recently expanded to 23 markets with plans to add another 20 markets next year. The test flights would confirm whether a drone could deliver a package to a pick-up point in the parking lot of a store, the application says.

Wal-Mart also said it wants to test home delivery in small residential neighborhoods after obtaining permission from those living in the flight path. The test would see if a drone could be deployed from a truck “to safely deliver a package at a home and then return safely to the same,” the application says.

To date the FAA has approved more than 2,100 exemptions allowing for commercial drone testing and use.

(Reporting by Nathan Layne in Chicago and David Morgan in Washington, editing by Eric Effron and John Pickering)