The Indiana Supreme Court on Tuesday ruled that a woman who refused to unlock her phone with her passcode for police during a criminal investigation is protected by the U.S. Constitution.

The court’s decision reversed a contempt order against 29-year-old Katelin Seo of Carmel, which is about 20 miles north of Indianapolis.

An Apple iPhone5s held in one hand showing its screen with numpad for entering the passcode. (iStock)

The court determined that forcing her to unlock her iPhone for police would violate the Fifth Amendment, the Indianapolis Star reported.

“By unlocking her smartphone, Seo would provide law enforcement with information it does not already know, which the State could then use in its prosecution against her,” the court said.

Seo was charged with harassment and stalking in 2017. Hamilton County authorities wanted the passcode to her iPhone 7. Her attorney William Webster, argued that by unlocking her phone for police, she would essentially be helping them build a case against her.

The case has since been resolved. Seo is serving a prison sentence in an unrelated case.

INDIANA FAMILY GETS CLOSURE DECADE LATER, AFTER MISSING WOMAN’S CAR FOUND IN POND

Webster has said the state never revealed what exactly it was looking for on the phone.

The state argued said it had evidence showing that Seo used the cellphone to talk to the male victim in the case.

Webster said he expects the ruling to have a big impact on state and nationwide cases in the future on how investigators collect evidence.

CLICK HERE TO GET THE FOX NEWS APP

“I think this case will be used in other jurisdictions, and we think it was an important case for civil liberties,” Webster told Fox 59.

The Associated Press contributed to this report.