TUCSON, Ariz. – An Arizona man is the laughing stock of social media after he allegedly attempted to burglarize a Tucson elementary school, then hung himself out to dry as he fled the scene.

A locksmith on campus at Miles Elementary School noticed a man attempting to break into classrooms around 10:30 a.m. Saturday, but when the alleged burglar noticed the locksmith he quickly attempted to flee school grounds, Tucson Unified School District spokeswoman Stephanie Boe told KGUN.

MORE NEWS: Know These Before Moving From Cyprus To The UK

But the suspect’s escape plan hit a snag, however, when his baggy pants got caught on the school’s spiked metal front gate, which resulted in a very embarrassing situation. When police arrived, they found the man hanging upside-down from the gate by his pants, which were stripped down to his knees.

“One more reason not to jump fences in baggy pants,” witness Jesse Sensibar posted to Facebook along with a picture of the man dangling from the fence next to the school sign. “I saw this homie hanging around at the Miles School this morning when I was rolling eastbound on Broadway Avenue.

“I was going to help him off the fence but by the time I got back around the block the cops were rolling up two cars deep,” he continued. “I don’t know what his story way but it must not have been good enough, fifteen minutes later when I went back by the other direction going home he was cuffed up in the backseat. He smiled for the camera.”

Sensibar’s post soon went viral with more than 400 shares and nearly 100 comments in three days, as well as several local news broadcasts.

Police have not identified the man, and TUSD has not responded to media inquiries for details on the incident.

MORE NEWS: How to prepare for face-to-face classes

That didn’t stop folks from ridiculing the alleged criminal online, though.

“This my friends, is why your mom always told you never leave the house without clean underwear,” Misty Henley joked on Facebook.

“If you’re having a bad Monday … just remember this fool!” Vicki Bachert added.

“Puts new meaning to ‘left hanging by a thread,’” Kimmy Ingles wrote.

“So he was hung out to dry,” Al Decker posted.

“That’s karma!” Shannon Clutter added. “Too funny, good job dummy!”