The Iowa Court of Appeals has thrown out a drug conviction of a California woman based on the timing of the traffic stop that led to her arrest.

Eirka Lopez-Cardenas was a passenger in a van stopped by a state trooper in Pottawattamie County for having illegally tinted windows. The trooper wrote the ticket for the tinted window violations and checked the license of the driver in six minutes.

The trooper then became suspicious and called for a drug dog, but one was not available and he waited until around 49 minutes into the stop before the dog showed up. The dog found marijuana seeds in the van and Lopez-Cardenas was later found guilty of possession of a controlled substance with intent to manufacture and child endangerment because a young girl was also in the van.

She challenged the search and the Iowa Court of Appeals ruled the purpose of the traffic stop could have been handled in 13 to 17 minutes, and the court says the dash-camera video showed the stop was prolonged unconstitutionally.

The court threw out the evidence gained from the dog’s search and reversed the conviction.

Here’s the ruling: Lopez-Cardenas ruling PDF