ST. LOUIS • A defendant’s push for details about a cellphone tracking device used to investigate him was cut short Thursday with a plea agreement that dropped five of his six charges.

As part of the deal, Melvin Dante Hardy received a five-year term for being a felon in possession of a firearm. The defense dropped challenges to the use of the sophisticated tracker, whose full capabilities have been kept secret.

An earlier plea deal offer was for 12 years in prison, his lawyer said.

At the time of his arrest in January 2014, Hardy, of St. Louis, was sought on an arrest warrant stemming from a probation violation and in another investigation. He was convicted in St. Louis Circuit Court, and in 2015, he was indicted on federal drug and gun charges.

His challenge of the tracking technology was the latest in the St. Louis area, and had progressed the furthest.