CCTV and other security cameras are meant to stop crime, but an ingenious drug ring in a Mexican border town turned the lens back on the police, hiding an elaborate secret system of internet-controlled security cameras as a counter-surveillance program.

The cameras were discovered and dismantled by police, according to a report from Motherboard. The cartel was able to recover 18 out of 39 cameras hidden around the town of Reynosa after figuring out the jig was up.

The cameras could each be controlled wirelessly via modem, video card and data encoder, and power feeder, El Universal reports, and were scattered across Reynosa, a border town and coveted entry point into the United States for crime syndicates trafficking in narcotics and humans. A bulk of the cameras had been installed on telephone poles serviced by the Federal Electricity Commission, a public utility, and Telmex, the largest privately-held telco in Mexico.

An official with the state’s security coordination group, who insisted on anonymity because he was not authorized to release details on the case, said the cartel’s cameras were revealed when the government’s own surveillance cameras detected suspicious people making installations on poles.

It’s not clear which organized crime ring was behind the DIY system, though the Gulf Cartel is a primary suspect. The Gulf Cartel is also suspected of kidnapping telecom specialists and forcing them to build secret radio networks, so this is another example of how criminals hijack communications systems for illegal ends.