OREM, UT - SEPTEMBER 18: The Touch ID of an Apple iPhone 6 Plus gold, is shown here at a Verizon store on September 18, 2014 in Orem, Utah. Apples new iPhone 6's go on sale tomorrow September 20, 2014. (Photo by George Frey/Getty Images

Cops can't make you give them your smartphone password -- but they can compel you to slap your finger onto your Apple Touch ID device to unlock it, a Virginia court ruled Thursday.

It's an odd sort of loophole: The Fifth Amendment protects you from offering knowledge that could incriminate yourself, meaning you don't have to tell a cop your phone's password if he or she asks you for it. But you can be required to turn over physical evidence or DNA information. In the Virginia case, the judge ruled that a fingerprint is considered a physical object -- and police are allowed to force you to give it to them.

Apple's Touch ID lets you unlock your iPhone or iPad with your fingerprint, saving you the trouble of typing in a password. The feature made its debut last year and is available on the iPhone 5S, iPhone 6 and 6 Plus, iPad Air 2, and iPad Mini 3.

The ruling by Virginia Beach Circuit Court Judge Steven Frucci is linked to the case of David Baust, an emergency medical services captain who was charged in February with attempting to strangle his girlfriend. Prosecutors wanted to access video on Baust's locked phone, the Virginian-Pilot reported.

The Touch ID case is not as binding as a Supreme Court ruling, but it sets a precedent that other cases can draw on, Mashable noted. According to the Virginian-Pilot, it's unclear how the ruling will impact Baust's case. If his phone is protected by Touch ID, prosecutors could access it using Frucci's ruling. If the phone is protected by a passcode or both a passcode and Touch ID, they can't.

Tech experts have been suspicious of the Touch ID security feature from its rocky beginnings. Marcia Hofmann predicted this ruling in Wired way back in 2013, when the feature was first announced.

"We can't invoke the privilege against self-incrimination to prevent the government from collecting biometrics like fingerprints, DNA samples, or voice exemplars," Hofmann wrote.

One workaround to this issue could be to just turn off your phone if cops approach. In that case, you'd have to enter your four-digit pin when you turn it back on, even if you use Touch ID.