Updated

The Latina teenager who made national headlines after flipping off a judge apologized on Friday, hoping a reversal on her sentence.

A video of Penelope Soto’s confrontation with the judge on Monday quickly went viral. During a follow-up hearing Friday, she apologized to Judge Jorge Rodriguez-Chomat, who showed leniency.

He dropped the contempt-of-court charges and nixed her 30-day jail term.

Soto admitted Friday she was under the influence of Xanax and alcohol when she made the obscene middle-finger gesture and rude comments earlier this week directed at Rodriguez-Chomat.

Soto tearfully apologized to the judge, who said the episode should be a lesson in how to treat people properly. Rodriguez-Chomat said Soto would have been a convicted felon if he allowed the contempt charge to stand.

Her lawyer said Soto will complete a drug court program. That includes treatment for drug addiction and usually results in charges eventually being dropped for first-time offenders.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino