BANGOR, Maine — A Hampden man was charged with driving to endanger Tuesday night after a high-speed sprint through Main Street that ended in a rollover.

After the crash, which occurred about 8 p.m. directly in front of the city’s central fire station, Ira Perkins, 27, was taken to St. Joseph Hospital in Bangor for treatment of minor injuries, Bangor police Officer Rob Angelo said.

“He didn’t have to go far for emergency services,” Bangor police Sgt. Bob Bishop said, referring to the fire station’s paramedics and emergency medical personnel. The accident also happened only about a block from the police station.

Angelo said Perkins was still being evaluated in the hospital emergency department late Tuesday.

Angelo estimated that Perkins was driving his green Ford Ranger at 80 mph in the moments leading up to the crash. He said he based that estimate on statements from several witnesses who told police that Perkins passed them traveling at speeds ranging from 70 to 90 mph.

According to Angelo, Perkins began his dramatic ride in nearby Hampden. For reasons that were not yet clear late Tuesday, the motorist began speeding on Main Street in Bangor toward downtown, passing other vehicles along the way.

When he reached the intersection of Main and Railroad streets, the traffic light was red, Angelo said. In an apparent effort to avoid hitting four vehicles that were stopped there waiting for the light to turn green, Perkins passed them on the right and blew through the red light, Angelo said.

Perkins then nearly hit head-on another vehicle that was stopped on the opposite side of the intersection, before losing control of his pickup and slamming into a snowbank. The momentum he’d built up caused the pickup to roll over on its side at least twice before coming to a rest upside down.

Bishop, who has been a city police officer for more than 25 years, said it was “rare” to see a rollover on Main Street, which is relatively straight and has a posted speed limit of 25 mph.

“You hardly ever see them. I can only think of maybe three,” he said, adding that if Perkins had been unable to avoid the head-on crash, “it could’ve been carnage.”

Bishop and Angelo were surprised that Perkins, who wasn’t wearing a seat belt, didn’t appear to be seriously hurt.

“He’s actually fine,” said Angelo, who stopped by the hospital to check on him. “It’s amazing no one got hurt.”

Harold Murray, who happened to be standing nearby on Main Street, witnessed the accident.

“It was a miracle that he didn’t hit anybody,” Murray said.

He said that Perkins managed to crawl out of the wreckage on his own.

Angelo said the accident remains under investigation and that additional charges could follow. He also said that alcohol was not a factor.