(Image: US Marshals)

The US Central Intelligence Agency (CIA) is said to have played a "crucial role" in helping federal agents collect data from thousands of Americans' cellphones.

A new report by the Wall Street Journal detailed how the intelligence agency and the US Marshals Service, an agency from the Justice Department, worked together to develop "dirtboxes," a device that can vacuum up vast amounts of cellphone data by mimicking cell towers.

Read this Meet the shadowy tech brokers that deliver your data to the NSA These so-called "trusted third-parties" may be the most important tech companies you've never heard of. ZDNet reveals how these companies work as middlemen or "brokers" of customer data between ISPs and phone companies, and the U.S. government. Read More

The newspaper reported last year on how the Justice Department flew low-flying light aircraft over US towns and cities in an effort to hunt suspected criminals. In the process, a significant number of Americans' data was scooped up.

The CIA, which is said to have provided most of the resources in the early days of the relationship, is barred from conducting most of its operations on US soil. Officials at the CIA and the Justice Dept. told the newspaper that they didn't violate those rules.

The co-operative effort, described as a "marriage" by people familiar with the programs, shows (not for the first time) how criminal investigations are relying more and more on US intelligence agencies for technical and operational support, the report said.

Amid the first reports from the Edward Snowden cache of leaked classified documents, the Justice Dept. was forced to investigate whether its drug enforcement division collaborated with the National Security Agency (NSA).

The Drug Enforcement Agency (DEA) was said to have used intelligence gathered by the NSA. The tipped-off information was allegedly later "masked" and "recreated" in the courts to prevent the source of the information being revealed.

The NSA has repeatedly said it does not conduct surveillance on US citizens in line with the Fourth Amendment, despite leaks and reports suggesting otherwise.

The dirtbox program is now subject to a Senate Judiciary Committee inquiry, which will report its findings later this year.