A state prison guard was arrested after the motorcycle he was driving slammed into a flag pole at a public library in Tioga County.

Authorities say 25-year-old Cody Lowe of Apalachin was charged with driving while intoxicated following the early-morning crash.

According to New York State Police, Lowe was traveling West on Main Street when he failed to negotiate a curve. The motorcycle hit a tree, became airborne, struck the ground and then slammed into a flag pole at the Apalachin Library.

A New York State Police trooper at the scene of a motorcycle crash in Apalachin. (Photo: Bob Joseph/WNBF News)

A nearby resident said the crash occurred shortly after 1:30 a.m. Friday.

Investigators say Lowe was thrown from the motorcycle and landed several feet from the pole, which was seriously damaged by the impact.

Lowe sustained injuries to his head, back, arm and hip. He was taken to Wilson Medical Center in Johnson City.

Lowe was ordered to appear in Owego town court on July 16.

A woman who told a reporter she was the driver's mother declined to comment at the scene of the crash.

A man who said he heard the crash said the motorcycle had been traveling "back and forth" on Main Street at a high rate of speed.

The neighbor said he "came down here hauling ass." He said the engine sounded "really loud" and then, suddenly, there was silence.

A motorcycle became airborne before slamming into a flag pole at the Apalachin Library on June 28, 2019. (Photo: Bob Joseph/WNBF News)

Contact WNBF News reporter Bob Joseph: bob@wnbf.com

For breaking news and updates on developing stories, follow @BinghamtonNow on Twitter.