After a brief standoff, police have taken into custody a man who sideswiped a freight train with a truck reported stolen earlier Thursday in rural northern Colorado.

Aerial footage broadcast by a news station helicopter showed Weld County sheriff's deputies and local police taking the man into custody alongside a rail line near the town of Nunn, about 65 miles north of Denver, shortly before 12 p.m.

KENTUCKY RECEIVES $5 MILLION FEDERAL GRANT TO PREVENT INTERSTATE CRASHES

The man, whose identity wasn't immediately released, refused to leave the truck after the collision, which was reported shortly after 9:30 a.m. That prompted a standoff with officers bearing firearms and shields, said Joe Moylan, a spokesman with the Weld County Sheriff's Office.

Officers tried firing one round of tear gas to force him out, then smashed a window on the passenger's side of the vehicle to distract him and grabbed him from the driver's side, Moylan said.

Man in custody after stealing a truck and then hitting a freight train in Colorado

A man stole a truck and then hit a freight train near Nunn, Colorado on Sept. 1, 2022. 

The man was taken to a local hospital for evaluation of any injuries and was to be transferred to authorities in neighboring Larimer County, where the truck was reported stolen from a construction site at about 8:30 a.m., Moylan said. The crew of the Union Pacific freight train was unhurt.

TWO TRAIN CARS DERAIL IN TEXAS LEAVING AT LEAST 1 PERSON DEAD

The Colorado State Patrol closed a nearby stretch of U.S. Route 85 as a precaution during the standoff, said Master Trooper Gary Cutler.

A spokesperson for the Larimer County Sheriff's Department couldn't immediately be reached for comment by telephone.