A St. Louis teenager is accused of stealing a gun from a car, and police say it was his own Facebook post that led to his arrest.

The St. Louis Post-Dispatch reports that 17-year-old Christian Eaton is charged with felony stealing for the theft of a 9mm semiautomatic pistol from a woman's unlocked car in July in St. Louis County.

Eaton and a female friend were stopped by police the night of the theft. The friend later told police Eaton had tossed the gun as the officer approached, then returned to retrieve it.

Eaton blamed the female friend for the theft. But police say they found text messages in which Eaton bragged about it, as well as a photo on his Facebook page of him holding the gun.