The driver of a pickup truck found himself perilously dangling from a highway overpass after crashing his vehicle through a metal guardrail near Beaverton, Ore., on Saturday.

The driver, Matthew Allen Hamilton, 38, was apparently about to merge onto Oregon’s Highway 217 via an overpass when he crashed through the guardrail. If the truck’s back tires had not become stuck on the rail, it would have wound up on the highway below.

Firefighters took nearly an hour to extract Hamilton from his truck, the Associated Press reported. Even after the driver was extracted, the overpass was shut down for several hours as road crews worked to remove the truck. Ultimately, the truck was removed with a large crane.

Hamilton was taken to a local hospital to be treated for injuries that are not believed to be life-threatening.

Local police have not officially commented on how the crash occurred, but AP reported Hamilton was arrested on suspicion of driving under the influence and that he will be taken to jail from the hospital as soon as feasible.