WASHINGTON— Mysterious, middle-of-the-night drone flights by the U.S. Secret Service during the next several weeks over parts of Washington — usually off-limits as a strict no-fly zone — are part of secret government testing intended to find ways to interfere with rogue drones or knock them out of the sky, The Associated Press has learned.

A U.S. official briefed on the plans said the Secret Service was testing drones for law enforcement or protection efforts and to look for ways, such as signal jamming, to thwart threats from civilian drones. The drones were being flown between 1 a.m. and 4 a.m. The official spoke on condition of anonymity because this person was not authorized to publicly discuss the plans. The Secret Service has said details were classified.

Some consumer-level drones, which commonly carry video cameras, are powerful enough to carry small amounts of explosives or a grenade.

The challenge for the Secret Service is quickly detecting a rogue drone flying near the White House or the president's location, then within moments either hacking it to seize control over its flight or jamming its signal to send it off course or make it crash.

The Secret Service has said only that it will openly test drones over Washington, but it declined to provide details such as when it will fly, how many drones, over what parts of the city, for how long and for what purposes. It decided to tell the public in advance about the tests out of concern that people who saw the drones might be alarmed, particularly in the wake of the drones spotted recently over Paris at night. Flying overnight also diminishes the chances that radio jamming would accidentally affect nearby businesses, drivers, pedestrians and tourists.

It is illegal under the U.S. Communications Act to sell or use signal jammers except for narrow purposes by government agencies.

Depending on a drone's manufacturer and capabilities, its flight-control and video-broadcasting systems commonly use the same common radio frequencies as popular Wi-Fi and Bluetooth technologies. Jamming by the Secret Service — depending on how powerfully or precisely it works — could disrupt nearby Internet networks or phone conversations until it's turned off. Testing in the real-world environment around the White House would reveal unexpected effects on jamming efforts from nearby buildings, monuments or tall trees.

Signals emanating from an inbound drone — such as coming from a video stream back to its pilot — could allow the Secret Service to detect and track it.

Federal agencies generally need approval to jam signals from the U.S. telecommunications advisory agency, the Commerce Department's National Telecommunications and Information Administration. That agency declined to tell the AP whether the Secret Service sought permission because it said such requests are not routinely made public.

The Federal Aviation Administration has confirmed it formally authorized the Secret Service to fly the drones and granted it a special waiver to fly them over Washington. The agency declined to provide specifics about the secret program.

In January, a wayward quadcopter drone, piloted by an off-duty U.S. intelligence employee, landed on the White House lawn. At the time, the Secret Service said the errant landing appeared to be accidental and was not considered a security threat.

The agency had been looking at security issues surrounding drones before the January crash, but the crash of that drone led the agency to focus more attention on security issues surrounding small, unmanned aircraft that can be hard to detect. Previously published reports have disclosed that the Secret Service already uses jammers in presidential and vice presidential motorcades to disrupt signals that might detonate hidden remotely triggered improvised explosive devices.

Researchers with the Homeland Security Department's science and technology directorate are working on strategies to interdict an unauthorized drone flying inside security areas. The research arm of DHS is trying to balance security concerns of the small, hard-to-detect devices, with the burgeoning commercial use and interests of hobbyists. Likewise, the National Telecommunications and Information Administration said last week it's studying how the U.S. can resolve privacy risks with increasing use of drones.

The Homeland Security Department hosted a two-day meeting last month with industry officials, law enforcement and academics to discuss balancing security and commercial interests and establishing security practices. Days later, the Secret Service, which is part of the Homeland Security Department, distributed a three-sentence press release saying it will "conduct a series of exercises involving unmanned aircraft systems, in the coming days and weeks."

Trying to keep drones out of a secure area can be tricky.

There are basically three ways to stop a drone, said Jeremy Gillula, a staff technologist at the Electronic Frontier Foundation: block the radio signals linking the drone to its controller, hack the aircraft's control signals and trick it into believing it is somewhere else, or physically disable it. Some drone manufacturers program a "geo fence" — location coordinates their drones treat as off-limits and refuse to fly past — into the drone's programming. Police could physically knock a drone out of the air with a projectile or use a net to catch it.

"If it were me that would actually be the first thing I would think about doing," Gillula said. "You would have to basically encase the White House in this net. It sure wouldn't look pretty, but in some ways it would be the most effective way."