WASHINGTON—The Justice Department has been building a national database to track in real time the movement of vehicles around the U.S., a secret domestic intelligence-gathering program that scans and stores hundreds of millions of records about motorists, according to current and former officials and government documents.

The primary goal of the license-plate tracking program, run by the Drug Enforcement Administration, is to seize cars, cash and other assets to combat drug trafficking, according to one government document. But the database’s use has expanded to hunt for vehicles associated with numerous other potential crimes, from kidnappings to killings to rape suspects, say people familiar with the matter.

Officials have publicly said that they track vehicles near the border with Mexico to help fight drug cartels. What hasn’t been previously disclosed is that the DEA has spent years working to expand the database “throughout the United States,’’ according to one email reviewed by The Wall Street Journal.

Many state and local law-enforcement agencies are accessing the database for a variety of investigations, according to people familiar with the program, putting a wealth of information in the hands of local officials who can track vehicles in real time on major roadways.

The database raises new questions about privacy and the scope of government surveillance. The existence of the program and its expansion were described in interviews with current and former government officials, and in documents obtained by the American Civil Liberties Union through a Freedom of Information Act request and reviewed by The Wall Street Journal. It is unclear if any court oversees or approves the intelligence-gathering.

A spokesman for Justice Department, which includes the DEA, said the program complies with federal law. “It is not new that the DEA uses the license-plate reader program to arrest criminals and stop the flow of drugs in areas of high trafficking intensity,’’ the spokesman said.

Sen. Patrick Leahy, senior Democrat on the Senate Judiciary Committee, said the government’s use of license-plate readers “raises significant privacy concerns. The fact that this intrusive technology is potentially being used to expand the reach of the government’s asset-forfeiture efforts is of even greater concern.’’

The senator called for “additional accountability’’ and said Americans shouldn’t have to fear ”their locations and movements are constantly being tracked and stored in a massive government database.’’

The DEA program collects data about vehicle movements, including time, direction and location, from high-tech cameras placed strategically on major highways. Many devices also record visual images of drivers and passengers, which are sometimes clear enough for investigators to confirm identities, according to DEA documents and people familiar with the program.

The documents show that the DEA also uses license-plate readers operated by state, local and federal law-enforcement agencies to feed into its own network and create a far-reaching, constantly updating database of electronic eyes scanning traffic on the roads to steer police toward suspects.

The law-enforcement scanners are different from those used to collect tolls.

By 2011, the DEA had about 100 cameras feeding into the database, the documents show. On Interstate 95 in New Jersey, license-plate readers feed data to the DEA—giving law-enforcement personnel around the country the ability to search for a suspect vehicle on one of the country’s busiest highways. One undated internal document shows the program also gathers data from license-plate readers in Florida and Georgia.

“Any database that collects detailed location information about Americans not suspected of crimes raises very serious privacy questions,’’ said Jay Stanley, a senior policy analyst at the ACLU. “It’s unconscionable that technology with such far-reaching potential would be deployed in such secrecy. People might disagree about exactly how we should use such powerful surveillance technologies, but it should be democratically decided, it shouldn’t be done in secret.’’

License-plate readers are already used in the U.S. by companies to collect debts and repossess vehicles, and by local police departments to solve crimes.

In 2010, the DEA said in internal documents that the database aided in the seizure of 98 kilograms of cocaine, 8,336 kilograms of marijuana and the collection of $866,380. It also has been connected to the Amber Alert system, to help authorities find abducted children, according to people familiar with the program.

One email written in 2010 said the primary purpose of the program was asset forfeiture—a controversial practice in which law-enforcement agencies seize cars, cash and other valuables from suspected criminals. The practice is increasingly coming under attack because of instances when law-enforcement officers take such assets without evidence of a crime.

The document said, “…DEA has designed this program to assist with locating, identifying, and seizing bulk currency, guns, and other illicit contraband moving along the southwest border and throughout the United States. With that said, we want to insure we can collect and manage all the data and IT responsibilities that will come with the work to insure the program meets its goals, of which asset forfeiture is primary.’

A number of lawmakers have been planning to offer legislation to rein in what they call abuses of asset-forfeiture laws. The Justice Department recently announced it was ending its role in one type of asset seizure, known as “adoptions,’’ a process by which local officials take property, then have the assets adopted and sold by the federal government. Often, that allows the local agency to keep a higher percentage of the money from the seizure. The policy change doesn’t affect the bulk of asset seizures in the U.S.

The national vehicle database program was launched in 2008 and opened to participating state and local authorities a year later. The initial focus was on tracking cars moving on or near the Southwest border, in order to follow the movements of drugs and drug money, according to officials and documents. Requests to search the database are handled by the El Paso Intelligence Center in Texas, which is known as EPIC in law enforcement circles. EPIC is staffed around the clock to both take in and send out information about “hits’’ on requested license plates.

The effort began in border states like Arizona, California, Nevada, New Mexico and Texas, but the goal has always been expansion, according to current and former federal officials and documents. Officials wouldn’t say how many other states are now feeding data into the system, citing concerns that disclosing such information could help criminals avoid detection.

The federal program hasn’t always been embraced by states. At a 2012 hearing, Utah lawmakers balked when DEA officials sought to have license-plate readers in the state feed into the database—one of the few times the agency has provided even limited facts about the program. That same year, a DEA official made a general reference to the program at a congressional field hearing about the Southwest border, saying it was built to monitor and target vehicles used to transport bulk cash and other contraband.

Under questioning from Utah lawmakers, the agency said the program began with an effort to track drug shipments on the Southwest border, and the government wanted to add monitors on major drug-trafficking routes like Utah’s Interstate 15, in order to hunt a wide array of criminals. That alarmed privacy advocates, who noted at the time that the DEA’s map of major drug routes included most of the national highway system.

The agency has reduced the time it holds the data from two years to 3 months, according to a Justice Department spokesman.

The EPIC database allows any police agency that participates to quickly search records of many states for information about a vehicle. One May 2010 redacted email says: "Anyone can request information from our [license-plate reader] program, federal, state, or local, just need to be a vetted EPIC user.…’’

The data are also shared with U.S. border officials, according to an undated memorandum of understanding between the DEA and Customs and Border Protection officials. That document shows the two agencies specifically said that lawmakers might never specifically fund the work, stating: “this in no way implies that Congress will appropriate funds for such expenditures.’’

The disclosure of the DEA’s license-plate reader database comes on the heels of other revelations in recent months about the Justice Department, as well as the agencies it runs, gathering data about innocent Americans as it searches for criminals.

In November, The Wall Street Journal reported that the U.S. Marshals Service flies planes carrying devices that mimic cellphone towers in order to scan the identifying information of Americans’ phones as it searches for criminal suspects and fugitives. Justice Department officials have said the program is legal.

Earlier this month, the DEA filed court documents indicating that for more than a decade it had gathered the phone records of Americans calling foreign countries, without judicial oversight, to sift through that data looking for drug suspects. That program was canceled in 2013.