Flight records maintained by the Web site Flightradar24 shows a small Cessna jet flying a precise formation over Baltimore late Saturday night, May 2. Note: This video does not contain audio. (Flightradar24)

As Benjamin Shayne settled into his back yard to listen to the Orioles game on the radio Saturday night, he noticed a small plane looping low and tight over West Baltimore — almost exactly above where rioting had erupted several days earlier, in the aftermath of the death of a black man, Freddie Gray, injured in police custody.

The plane appeared to be a small Cessna, but little else was clear. The sun had already set, making traditional visual surveillance difficult. So, perplexed, Shayne tweeted: “Anyone know who has been flying the light plane in circles above the city for the last few nights?”

That was 9:14 p.m. Seven minutes later came a startling reply. One of Shayne’s nearly 600 followers tweeted back a screen shot of the Cessna 182T’s exact flight path and also the registered owner of the plane: NG Research, based in Bristow, Va.

“The Internet,” Shayne, 39, told his wife, “is an amazing thing.”

What Shayne’s online rumination helped unveil was a previously secret, multi-day campaign of overhead surveillance by city and federal authorities during a period of historic political protest and unrest.

Discovery of the flights — which involved at least two airplanes and the assistance of the FBI — has prompted the American Civil Liberties Union to demand answers about the legal authority for the operations and the reach of the technology used. Planes armed with the latest surveillance systems can monitor larger areas than police helicopters and stay overhead longer, raising novel civil liberties issues that have so far gotten little scrutiny from courts.

Civil libertarians have particular concern about surveillance technology that can quietly gather images across dozens of city blocks — in some cases even square miles at a time — inevitably capturing the movements of people under no suspicion of criminal activity into a government dragnet. The ACLU plans to file information requests with federal agencies on Wednesday, officials said.

“A lot of these technologies sweep very, very broadly, and, at a minimum, the public should have a right to know what’s going on,” said Jay Stanley, a senior policy analyst at the ACLU specializing in privacy and technology issues.

The FBI declined to comment on the flights Tuesday, but confirmed on Wednesday that it had provided aircraft to the Baltimore Police Department for the purpose of “providing aerial imagery of possible criminal activity.” Capt. Eric Kowalczyk, a Baltimore Police Department spokesman, referred questions about the flights to the FBI.

A government official familiar with the operations, speaking on the condition of anonymity to discuss matters not approved for public release, said the flights were aerial support that Baltimore police officials requested from the FBI.

Flight records maintained by the Web site Flightradar24 show two Cessnas — one a propeller plane, the other a small jet — flying precise formations over the part of West Baltimore where the rioting had occurred. The smaller Cessna conducted flights in the area on Thursday, Friday and Saturday, always after dark. The planes used infrared technology to monitor movements of people in the vicinity, the official said.

The exact reach of the infrared technology is not clear. Civil libertarians have long warned that the ability to track the movements of individuals — even if their names are not initially known — can allow authorities to identify people, intruding on personal privacy and chilling the constitutionally guaranteed freedom of association.

The screengrab taken from Flightradar24.com on May 2 shows the flight path of a small jet early Saturday morning. The image was made by Pete Cimbolic, a former ACLU employee and current aviation buff who lives in North Baltimore.

“We have the right to demand to know what’s happening,” said Jennifer Lynch, a senior staff attorney with the Electronic Frontier Foundation, a civil liberties group based in San Francisco. “Whether the government will respond to that, that’s the question.”

The Twitter follower who unearthed the first round of facts about the surveillance flights was Pete Cim­bolic, a former ACLU employee and current aviation buff who lives in North Baltimore. He had grown accustomed to following the Twitter feed of Shayne, 39, a fellow Baltimorean who runs Scanbaltimore.com, a Web site that monitors police activity and live-streams the ongoing chatter on official radio channels.

When Cimbolic saw Shayne’s query about the flights, he checked the aviation radar Web site and began tracking the first, smaller Cessna as it was still in the air.

It showed a continuous, circling path that appeared to have its center directly above the intersection of Pennsylvania and North avenues, where the most violent unrest was centered after Gray’s funeral on April 27. Six police officers have been charged with crimes related to Gray’s death.

That plane was registered to NG Research in Bristow, near Manassas Regional Airport. Searches of public records revealed little about the company, which could not be reached. Cimbolic initially thought it was part of Northrop Grumman, a leading government contractor, and made reference to his hunch in a tweet. The company told The Washington Post on Wednesday that it had no relationship with NG Research.

Cimbolic also linked to a long Reddit posting that included reports of seeing the same plane — tail number N539MY — circling above Langley and McLean in Northern Virginia last year.

“The fact that at any point the government or a contractor for the government could have a wide view or a large picture of what’s going on on block after block of the city is really concerning,” Cimbolic said. “It’s scary.”

Cimbolic was beginning to worry that he had overreacted when he noticed, on the same flight-radar Web site, the second plane flying higher in the sky, carving bigger loops above West Baltimore. The Web site reported that this plane was a Cessna 560 Citation V, a small jet. But it showed no tail number, offering no possible trail to Federal Aviation Administration records. This only heightened his curiosity.

Cimbolic soon contacted the ACLU of Maryland, which forwarded the issue to the national ACLU office, which is planning to file information requests with the FBI, the Drug Enforcement Administration, the U.S. Marshals Service and the FAA.

The U.S. Marshals Service would be of particular concern because, as the Wall Street Journal reported in November, it has used cellphone-tracking devices called “IMSI catchers” in airplanes to track the movements of people in U.S. cities. But the Marshals Service said it had no planes in Baltimore last weekend.

FBI spokesman Christopher Allen declined to comment on whether the bureau had planes in the Baltimore area last weekend, but he said the bureau had not used “cell-site simulators” — the FBI’s term for the IMSI catchers — in any operation related to the recent unrest in that city.

On Wednesday, the FBI released a statement, saying: “The aircraft were specifically used to assist in providing high-altitude observation of potential criminal activity to enable rapid response by police officers on the ground. The FBI aircraft were not there to monitor lawfully protected first amendment activity, and any FBI aviation support to a local law enforcement agency must receive high level approvals.”

In Cimbolic’s research over the weekend, he also came across a Washington Post article, from February 2014, that described how an Ohio-based company called Persistent Surveillance Systems was using airborne surveillance to monitor 25-square-mile swaths of cities to re­cord images of crimes as they happen.

But the head of that company, Ross McNutt, said in an interview on Monday that his company was not involved in the Baltimore operation. He said the kinds of sensors used in most government surveillance flights can see at least a five-block-by-five-block area.

McNutt said a wider view would be more useful in tracking down people who had committed crimes. “What they need is a system that follows people back to the house they came out of.”

Peter Hermann, Julie Tate and Darla Cameron contributed to this report.

Follow The Post’s tech blog, The Switch, where technology and policy connect.