A global sting operation by the FBI and other law enforcement agencies duped criminals into using an encrypted app created by investigators, intercepting more than 27 million messages and exposing plots to smuggle drugs, sell illegal weapons and launder money.

The Federal Bureau of Investigation created its own encrypted device company called ANOM that transnational criminal groups unknowingly used, leading to an unprecedented, coordinated global takedown that resulted in about 800 arrests and the seizure of 22 tons of marijuana, two tons of methamphetamine and more than $48 million in currencies, officials from the U.S. and other countries announced Tuesday.

Devices equipped with the app gave law enforcement agencies unique insights into criminal plots over 18 months, such as the smuggling of hundreds of kilograms of cocaine concealed in shipments of pineapples, bananas and cans of tuna. The operation, called Trojan Shield, also exposed corruption by police officers, resulting in the arrest of six law enforcement officers who allegedly used the devices to communicate with transnational criminals.

“The criminals using these devices believed they were secretly planning crimes far beneath the radar of law enforcement,” said Randy Grossman, acting U.S. Attorney for the Southern District of California.

‘A Beacon’

“In reality the criminals were not underneath the radar, they were on it,” Grossman told reporters in a news conference Tuesday. “The very devices the criminals used to hide their crimes were actually a beacon for law enforcement.”

Grossman’s office unveiled an indictment Tuesday charging 17 foreign nationals for their alleged involvement in marketing and distributing thousands of encrypted devices to transnational criminal groups, according to the announcement.

More than 12,000 ANOM encrypted devices were used by more than 300 criminal syndicates operating in more than 100 countries.