WILLIAMSON COUNTY, Texas – For once, a story about a selfie that helped someone rather than hurting them.

A Texas man was confused when police arrested him in September of last year, telling him he was accused of breaking into an ex-girlfriend’s home, attacking her, and slashing an “X” into her chest with a box cutter.

When they told Cristopher Precopia the date of the alleged attack, however, he realized he had been out of town, about 65 miles away at a hotel with his mom and others. Photos were taken and posted to social media, including a selfie obtained by KVUE.

Nine months after his arrest, Precopia’s lawyers took the evidence of his alibi to Bell County prosecutors, and the charge was dropped.

The felony charge, burglary of a habitation with the intent to commit other crimes, came with a possible prison term of 99 years. It’s not clear what evidence the Temple Police Department had or thought they had, and police won’t talk about their handling of the case.

Precopia’s alibi evidence included time-stamped, geolocated photos, as well as sworn affidavits from people with him on the night in question.

“Most of the time, we deal with gray matters,” says his attorney. “It’s not normally black or white. But this is one of those cases where I could definitely prove he did not commit this offense.”

(A study recently tallied the body count of selfies-turned-deadly.)

More From Newser: