The Arizona Supreme Court ruled Thursday that a person must consent to blood testing in cases of driving under the influence, or law-enforcement officers must obtain warrants.

The case stems from charges against a Pima County teenager who allegedly drove to school under the influence of marijuana. The teenager was placed in handcuffs when he became agitated and was kept in a separate room while Pima County sheriff’s deputies retrieved a blood test kit.

He was eventually uncuffed and deputies explained to him that he had to submit to the blood test because he held an Arizona driver’s license. He agreed and was subsequently arrested on suspicion of driving under the influence.

His lawyers argued the consent was not voluntary because the teen had been detained, and the Supreme Court agreed.

Four of the five justices signed the opinion. The fifth, John Pelander, concurred but with a separate opinion in which he cited concerns that the ruling opens the legal door for people to get evidence suppressed by saying they did not consent.