Facebook saved an American teenager from a 25-year prison term for armed robbery, according to his lawyer.

Cops detained Rodney Bradford from New York for 13 days after he was accused of breaking into a Brooklyn residence with a gun, while he was eight miles away at his father’s place in Manhattan.

However, Bradford won his freedom, thanks to his Facebook status update, which showed what he was doing at the time the crime was committed.

The Telegraph reports that Bradford’s comment where he IS teasing his girlfriend for not having joined him to eat pancakes was accompanied by a time-stamp and “was probably instrumental in the district attorney’s decision to drop the charges,” his lawyer Robert Reuland said.

Jonah Bruno, a spokesman for the Kings County District Attorney’s office, confirmed that the case had been dismissed. Bradford could have been sentenced to 25 years in jail if he had been convicted in the case.

More In: Internet | Technology