A man spent 40 days behind bars after being falsely accused of having more than 700 gallons of what authorities thought was liquid meth, the man’s attorney said Wednesday after his client’s charges were dropped.

A federal judge dismissed the distribution charge against Juan Carlos Toscano Guzman on Friday after federal prosecutors filed a motion to dismiss that same day.

Toscano Guzman’s defense attorney, Oscar Vega, said Wednesday that further testing revealed the liquid — which Pharr police and the Drug Enforcement Administration thought could produce nearly 3 tons of meth — was in fact not liquid meth.

Instead, it was a mixture of chemicals and diesel that was being prepared for importation into Mexico.

Vega explained that Toscano Guzman, who worked for his brother, was importing chemicals into the United States, where they would be mixed with diesel, so that the product could be sent back to Mexico and avoid high importation taxes placed on diesel.

The defense attorney said the problem in the case was the rapid tests the Pharr Police Department and the DEA used to test the liquid. Vega said those rapid tests can lead to false charges because they can return false positives.

The DEA arrested Toscano Guzman Feb. 15 after a Pharr police officer who was responding to a call for service on an unrelated matter saw three people pouring a liquid substance from large barrels into smaller buckets on an empty property, according to the now-dismissed complaint.

The officer approached Toscano Guzman and began talking with him.

“During the conversation, Officer Salinas noticed that several tanker trailers on the property did not have hazard placards and notified dispatch,” the complaint stated.

After the Pharr Fire Department responded, authorities noticed crystallization around the barrels and in a clear plastic hose hanging across a chain-linked fence.

That’s when the rapid tests were administered, which returned the false positives, according to Vega.

Because of the alleged amount of meth in Toscano Guzman’s case, he was held without bond and lost approximately 40 days of his freedom and the money he spent on attorney fees for his representation.

Toscano Guzman is now free.