Helicopters hovered overhead hours before thousands of people headed to President Donald Trump's rally at the Phoenix Convention Center, or to protest outside.

Much higher in the sky, a Phoenix Police Department plane circled downtown, according to flight-radar websites.

When unrest began as darkness set in after the rally, police used a spotlight and loudspeaker from a helicopter to warn protesters to disperse or face arrest.

MORE:Police used foam projectiles at anti-Trump protest in Phoenix

Law enforcement's air presence isn't exactly new for Phoenix-area residents.

Arizona law enforcement agencies use aircraft for search and rescues, to support officers on the ground in dangerous situations and for surveillance, which in a post-Edward Snowden world can conjure images of big brother and ever-watchful eyes peering down from the sky.

MORE:Phoenix to seek independent review of police response at Trump rally

The Phoenix plane overhead last week has a high-tech camera capable of following, tracking and seeing a target from miles away in most flying conditions, according to Federal Aviation Administration documents.

Mesa police rule the skies over the East Valley with a small fleet of helicopters and planes equipped with similar technology.

John Cauthen, Mesa's police-aviation administrator, said everyday citizen shouldn't worry.

"It isn't X-ray vision," Cauthen said. "Sometimes you can't see through thick brush."

Across the nation, police in cities such as Baltimore, New York and Oakland engage in constant aerial surveillance to fight crime. Some call it necessary, while critics see it as an intrusion into their privacy.

Arizona law-enforcement agencies don't appear to use constant surveillance. Most metro Phoenix police departments do not have air units.

But for those that do, how do they use aircraft in Arizona skies? And how do police make use of increasingly sophisticated technology that can help catch criminals while balancing the public's expectations of privacy?

Police are cautious in speaking about the aircraft and say privacy is not infringed.

"We don't focus on run-of-the-mill people," Chief Pilot Paul Apolinar of Phoenix police said about the plane's uses. "We focus on career criminals."

The American Civil Liberties Union nationally has called for a set of rules that would allow police to benefit from technology without creating a " 'surveillance society,' in which our every move is monitored, tracked, recorded and scrutinized by the authorities."

Which Arizona agencies have aircraft?

The Arizona Department of Public Safety has 14 aircraft, including nine planes and five helicopters. But two of the nine airplanes are non-operational and used for parts, said Quentin Mehr, DPS spokesman.

Other than disclosing the number of aircraft, DPS would not discuss its investigative techniques.

The Maricopa County Sheriff's Office has two planes and two helicopters. FAA records show DPS obtained one of the planes through civil forfeiture in 1982 after it was used to transport marijuana and gave it to MCSO in 1995.

The financial investment extends beyond purchasing the aircraft. Phoenix police, who operate five patrol helicopters and four planes, flew aircraft approximately 1,600 hours, costing $79,000 in fuel in 2015, according to data obtained by The Arizona Republic.

Meanwhile, Mesa police have two airplanes and three helicopters.

Together, the police agencies cover most of metro Phoenix and, along with DPS, assist agencies that do not have air units.

The Mesa police air unit assisted other agencies more than 170 times in 2016, Cauthen said.

And last December, Phoenix police used one of its airplanes to follow a man who had fled in a U-haul, leading police on a Valley-wide chase.

Police on the ground backed off the suspect, who was driving erratically. The unseen plane guided undercover officers closer without the driver knowing. When the man thought the coast was clear, he attempted to carjack a woman who was with her child, but police apprehended him before he could do so.

"We're a risk mitigator for car chases," Apolinar said. "We back off, and the bad guy thinks he is safe."

Police see the aircraft as an extension of normal policing needs.

"What we are doing is no different from what other officers are doing," Cauthen said. "We are just doing it from the sky."

But local law-enforcement agencies aren't alone in maneuvering Arizona skies. Federal agencies, including U.S Customs and Border Protection, also have aircraft.

Undercover federal aircraft?

Federal aircraft can be harder to track because agencies aren't always transparent.

Federal agencies have been known to disguise aircraft behind fake companies. In 2015, reporters discovered a fleet of FBI planes registered to fake companies that were flying over U.S. cities.

Mesa, Tempe, Phoenix, MCSO and DPS do not do this with aircraft, according to their FAA registration records.

But airworthiness and registration records obtained by The Republic reveal that two aircraft used by Customs and Border Protection are registered under a different name. At first glance, it would appear the aircraft are used for surveying, but the company has no online presence and no phone number.

The planes have high-tech camera systems and antennas for "law enforcement technical collection," FAA records show. The registered address for the aircraft is a P.O. Box in Albuquerque, but the registration lists a Customs Enforcement building at Kirtland Air Force Base as its physical address.

"You have marked police vehicles and you have unmarked police vehicles," said Erik Soykan, director of air operations for the National Air Security Operations Center with border patrol. The aircraft are used for more sensitive operations, and with the equipment they use, it is necessary for them to be covert, Soykan said.

The aircraft engage in some forms of electronic surveillance and data collection, but Soykan said the agency makes sure to acquire a warrant in the cases where necessary to protect Fourth Amendment privacy rights.

The aircraft can collect signals "across the electromagnetic spectrum," but border patrol would not clarify exactly what signals that entailed.

When asked if President Donald Trump's immigration policies have affected air operations, Soykan said there hasn't been any "real ramp up."

Soykan said the aircraft are often used for monitoring "national security events" such as the Super Bowl or the inauguration.

Local technology and larger privacy concerns

One of Phoenix police's airplanes had a Star Safire HD FLIR camera installed in 2010, according to FAA documents. The camera is touted as being the "world's first full high-definition multi-spectral imaging system," according to the company's website.

The Star Safire camera series has a 120x zoom ratio, meaning objects 10 miles away can be seen clearly, according to the website for FLIR, or forward-looking infrared device.

The camera system comes with a laser designator, according to FLIR.These types of lasers are used by drones to make sure a missile stays on target, but FLIR says police use the laser to help track subjects who are on the move.

Mesa's planes are equipped with a similar camera system made by a subsidiary of L3 Communications.

Mesa, Phoenix, MCSO and DPS also use thermal imaging, or FLIR. Groups such as the ACLU argue the technology can be intrusive and cause a "chilling effect" on free speech in public places.

Danny Lee Kyllo, of Oregon, was arrested in 2001 after a thermal-imaging device detected a large amount of heat coming from his garage when compared to the rest of his house. Federal agents assumed the heat was due to a marijuana-growing operation and obtained a search warrant, where they found more than 100 marijuana plants in his home.

Kyllo argued the use of a thermal-imagining camera to look into his house violated his Fourth Amendment rights. The case went to the U.S. Supreme Court, which ruled that monitoring heat from a person's home was a search and required a warrant.

However, that protection does not extend outside homes. In the 1986 Supreme Court case of California v. Ciraolo, police had received a tip that Dante Ciraolo had been growing marijuana in his backyard.

Police could not see into his backyard from the street due to high fences so the police borrowed a plane and flew it over the backyard where they easily spotted marijuana plants. Ciraolo argued that his Fourth Amendment rights had been violated but the court ruled there was no intrusion into his privacy.

“Any member of the public flying in this airspace who glanced down could have seen everything that these officers observed,” court documents state. However, the technology used on aircraft has come a long way since 1986.

Guidelines for aerial policing

MCSO, Phoenix, Mesa and DPS have similar policies on handling video footage obtained through aerial policing,according to Cauthen.

That includes strict policies surrounding any video or photos taken by the air unit, including being purged after a certain amount of time.

"Video footage of evidentiary value is submitted as evidence per appropriate policy regarding submission requirements," Cauthen said. "Recorded footage deemed non-evidentiary in nature or having any training value is required by policy to be purged after 120 days."

The Mesa air unit peforms audits of the stored footage every 30 days to make sure they are in compliance with those policies.

The Maricopa County Attorney's Office does not offer guidance, leaving that to the law-enforcement agencies.

"We generally do not specify investigative methods for the collection of evidence, other than to ensure the evidence was collected in a constitutional manner for use at a trial," Amanda Jacinto, spokeswoman for the Maricopa County Attorney's Office, said.

"We do not provide advice on the specific employment of law enforcement resources. That is the responsibility of those agencies," Jacinto said.

The Arizona branch of the ACLU is not monitoring the use of aerial assets in Arizona but the organization's national branch has been following how the technology is used, especially on protests. investigation.

More than surveillance

Technological advances lead to uncomfortable questions about privacy, but local law-enforcement agencies often use aircraft for far less high-tech purposes.

The Sheriff's Office primarily uses two Cessna aircraft for extradition as a two-man crew flies to surrounding states to pick up inmates or suspects, MCSO spokesman Mark Casey said.

"The cost to operate the aircraft is cheaper than having to send deputies on a commercial airline," Casey said. "And (it) is much safer and more efficient for the movement."

Beyond extradition, Casey said the planes are "sometimes utilized to do surveillance or fly investigators to a location."

The Sheriff’s Office uses its helicopter mainly for search-and-rescue operations, Senior Pilot Deputy Richard Dickner said.

MORE:Nearly 80 hikers rescued from Phoenix trails so far in 2017

In Mesa, police use its chopper for more typical policing needs.

A team of eight flies an average of 7.5 hours a day, Cauthen said.

The air support was critical when a gunman shot two people and fired multiple rounds at motorists on Arizona 87 near Fountain Hills in May 2016, Cauthen said.

When the suspect fled, the air unit searched the nearby desert and found him on the roadside. Police on the ground made the arrest.

"It's a perfect representation of why we exist and what we do," Cauthen said.

READ MORE:

Police body cameras are popular, despite limitations

Are police cameras invading your privacy?