Interstate 15 was closed for hours in both directions starting during rush hour Monday after a police stopped a parolee who got out a gun and walked onto the freeway while threatening to kill himself, officers said.

Passers-by reported that the man was on foot and acting strangely after a traffic crash about 5:30 p.m. near the end of the I-15 off-ramp on 650 North in Clearfield, said Utah Highway Patrol Sgt. Nick Street.

Uncertain whether the man was involved in the crash, Clearfield officers approached him. They were preparing to take “some sort of action” with the man, who had been paroled from prison, when he got out a gun and held it to his head, Street said. The man told police he would not go back to prison and began walking up the off-ramp, onto the highway.

The man wandered in and out of the traffic lanes, which officers closed in both directions, Street said.

Officers negotiated with the man for a while, but after discussions broke down they fired “pepper balls," which emit a strong irritant. While the man was choking, officers ordered a police dog to grab his arm to prevent him from shooting at anyone, Street said.

The man was taken into custody with “minor injuries," Clearfield Police reported, and then he was taken to a hospital, Street said. The highway reopened about 9 p.m., more than three hours after it closed.

Traffic was backed up for several miles in both directions through much of Monday night, as I-15 was closed between Clearfield and Roy.

“What a mess at this time of day,” Street said.