On Nov. 11, 2013, Victorville, California, sheriff’s deputies and a coroner responded to a motorcyclist’s report of human remains outside of town.

They identified the partially bleached skull of a child, and later discovered the remains of the McStay family who had been missing for the past three years. Joseph, 40, his wife Summer, 43, Gianni, 4, and Joseph Jr., 3, had been bludgeoned to death and buried in shallow graves in the desert.

Investigators long suspected Charles Merritt in the family’s disappearance, interviewing him days after they went missing. Merritt was McStay’s business partner and the last person known to see him alive. Merritt had also borrowed $30,000 from McStay to cover a gambling debt, a mutual business partner told police. None of it was enough to make an arrest.

Even after the gravesite was discovered and McStay’s DNA was found inside Merritt’s vehicle, police were far from pinning the quadruple homicide on him.

Until they turned to Project Hemisphere.

Hemisphere is a secretive program run by AT&T that searches trillions of call records and analyzes cellular data to determine where a target is located, with whom he speaks, and potentially why.

“Merritt was in a position to access the cellular telephone tower northeast of the McStay family gravesite on February 6th, 2010, two days after the family disappeared,” an affidavit for his girlfriend’s call records reports Hemisphere finding (PDF). Merritt was arrested almost a year to the date after the McStay family’s remains were discovered, and is awaiting trial for the murders.

In 2013, Hemisphere was revealed by The New York Times and described only within a Powerpoint presentation made by the Drug Enforcement Administration. The Times described it as a “partnership” between AT&T and the U.S. government; the Justice Department said it was an essential, and prudently deployed, counter-narcotics tool.

However, AT&T’s own documentation—reported here by The Daily Beast for the first time—shows Hemisphere was used far beyond the war on drugs to include everything from investigations of homicide to Medicaid fraud.

Hemisphere isn’t a “partnership” but rather a product AT&T developed, marketed, and sold at a cost of millions of dollars per year to taxpayers. No warrant is required to make use of the company’s massive trove of data, according to AT&T documents, only a promise from law enforcement to not disclose Hemisphere if an investigation using it becomes public.

These new revelations come as the company seeks to acquire Time Warner in the face of vocal opposition saying the deal would be bad for consumers. Donald Trump told supporters over the weekend he would kill the acquisition if he’s elected president; Hillary Clinton has urged regulators to scrutinize the deal.

While telecommunications companies are legally obligated to hand over records, AT&T appears to have gone much further to make the enterprise profitable, according to ACLU technology policy analyst Christopher Soghoian.

“Companies have to give this data to law enforcement upon request, if they have it. AT&T doesn’t have to data-mine its database to help police come up with new numbers to investigate,” Soghoian said.

AT&T has a unique power to extract information from its metadata because it retains so much of it. The company owns more than three-quarters of U.S. landline switches, and the second largest share of the nation’s wireless infrastructure and cellphone towers, behind Verizon. AT&T retains its cell tower data going back to July 2008, longer than other providers. Verizon holds records for a year and Sprint for 18 months, according to a 2011 retention schedule obtained by The Daily Beast.

The disclosure of Hemisphere was not the first time AT&T has been caught working with law enforcement above and beyond what the law requires.

Special cooperation with the government to conduct surveillance dates back to at least 2003, when AT&T ordered technician Mark Klein to help the National Security Agency install a bug directly into its main San Francisco internet exchange point, Room 641A. The company invented a programming language to mine its own records for surveillance, and in 2007 came under fire for handing these mined records over to the FBI. That same year Hemisphere was born.

By 2013, it was deployed to three DEA High Intensity Drug Trafficking Area (HIDTA) Investigative Support Centers, according to the Times. Today, Hemisphere is used in at least 28 of these intelligence centers across the country, documents show. The centers are staffed by federal agents as well as local law enforcement; one center is the Los Angeles Regional Criminal Information Clearinghouse, where Merritt’s number was sent for analysis.

Analysis is done by AT&T employees on behalf of law enforcement clients through these intelligence centers, but performed at another location in the area. At no point does law enforcement directly access AT&T’s data.

A statement of work from 2014 shows how hush-hush AT&T wants to keep Hemisphere.

“The Government agency agrees not to use the data as evidence in any judicial or administrative proceedings unless there is no other available and admissible probative evidence,” it says.

But those charged with a crime are entitled to know the evidence against them come trial. Adam Schwartz, staff attorney for activist group Electronic Frontier Foundation, said that means AT&T may leave investigators no choice but to construct a false investigative narrative to hide how they use Hemisphere if they plan to prosecute anyone.

Once AT&T provides a lead through Hemisphere, then investigators use routine police work, like getting a court order for a wiretap or following a suspect around, to provide the same evidence for the purpose of prosecution. This is known as “parallel construction.”

“This document here is striking,” Schwartz told The Daily Beast. “I’ve seen documents produced by the government regarding Hemisphere, but this is the first time I’ve seen an AT&T document which requires parallel construction in a service to government. It’s very troubling and not the way law enforcement should work in this country.”

The federal government reimburses municipalities for the expense of Hemisphere through the same grant program that is blamed for police militarization by paying for military gear like Bearcat vehicles.

“At a minimum there is a very serious question whether they should be doing it without a warrant. A benefit to the parallel construction is they never have to face that crucible. Then the judge, the defendant, the general public, the media, and elected officials never know that AT&T and police across America funded by the White House are using the world’s largest metadata database to surveil people,” Schwartz said.

The EFF, American Civil Liberties Union, and Electronic Privacy Information Center have all expressed concern that surveillance using Hemisphere is unconstitutionally invasive, and have sought more information on the program, with little success. The EFF is currently awaiting a judge’s ruling on its Freedom of Information Act suit against the Department of Justice for Hemisphere documentation.

AT&T spokesperson Fletcher Cook told The Daily Beast via an email that there is “no special database,” and that the only additional service AT&T provides for Atlanta’s intelligence center is dedicated personnel to speed up requests.

“Like other communications companies, if a government agency seeks customer call records through a subpoena, court order or other mandatory legal process, we are required by law to provide this non-content information, such as the phone numbers and the date and time of calls,” AT&T’s statement said.

Soghoian said AT&T is being misleading.

“They say they only cooperate with law enforcement as required, and frankly, that’s offensive when they are mining the data of millions of innocent people, and really built a business and services around the needs of law enforcement,” he said.

Sheriff and police departments pay from $100,000 to upward of $1 million a year or more for Hemisphere access. Harris County, Texas, home to Houston, made its inaugural payment to AT&T of $77,924 in 2007, according to a contract reviewed by The Daily Beast. Four years later, the county’s Hemisphere bill had increased more than tenfold to $940,000.

“Did you see that movie Field of Dreams?” Soghoian asked. “It’s like that line, ‘if you build it, they will come.’ Once a company creates a huge surveillance apparatus like this and provides it to law enforcement, they then have to provide it whenever the government asks. They’ve developed this massive program and of course they’re going to sell it to as many people as possible.”

AT&T documents state law enforcement doesn’t need a search warrant to use Hemisphere, just an administrative subpoena, which does not require probable cause. The DEA was granted administrative subpoena power in 1970.

The Supreme Court ruled in 1979’s Smith v. Maryland that “non-content” metadata such as phone records were like an address written on an envelope, and phone customers had no reasonable expectation that it would be kept private.

AT&T stores details for every call, text message, Skype chat, or other communication that has passed through its infrastructure, retaining many records dating back to 1987, according to the Times 2013 Hemisphere report. The scope and length of the collection has accumulated trillions of records and is believed to be larger than any phone record database collected by the NSA under the Patriot Act, the Times reported.

The database allows its analysts to detect hidden patterns and connections between call detail records, and make highly accurate inferences about the associations and movements of the people Hemisphere is used to surveil. Its database is particularly useful for tracking a subscriber between multiple discarded phone numbers, as when drug dealers use successive prepaid “burner” phones to evade conventional surveillance.

Some Hemisphere operations have regionally appropriate nicknames: Atlanta’s is “Peach,” while Hawaii’s has been called “Sunshine.” West Allis, Wisconsin, city council minutes do not name the contract at all, referring to it only as “services needed for an investigative tool used by each of the HIDTA’s Investigative Support Centers from AT&T Government Solutions.” In 2014 Cameron County, Texas, Judge Carlos Casco ordered a line item in the commission minutes changed from “Hemisphere Program” to “database analysis services.” Casco is now the secretary of State of Texas.

The Florida attorney general’s Medicaid Fraud Unit received “Hemisphere Project” training in 2013, according to a report on the unit’s data-mining activities. Florida is one of eight states that is allowed to spend federal money on anti-fraud data mining initiatives. Florida Medicaid fraud investigators use such technology to look for suspicious connections between call detail records such as “a provider and a beneficiary with the same phone number or address.”

A group of shareholders represented by Arjuna Capital are concerned about the effect of negative press on stock value, and filed a proposal in December 2015 to require the company to issue a statement “clarifying the Company’s policies regarding providing information to law enforcement and intelligence agencies, domestically and internationally, above and beyond what is legally required by court order or other legally mandated process.”

AT&T contested the proposal and the matter is now before the Securities and Exchange Commission.