WATCH: Robbery suspect narrowly misses oncoming train trying to evade Auburn police

Auburn Police released dashcam video that shows a suspect who just barely missed getting hit by a train while trying to escape capture. That suspect then led police on a high-speed chase before hiding from them in a tree.

Police were dispatched to Coastal Farm & Supply around 3:15 p.m. on Feb. 9 for reports of a threat involving a firearm. An employee told 911 that a suspect ran out of an emergency exit and threatened him with a gun.

Officers were following the suspect, but had to stop at 15th St. SW and Perimeter Dr. SW when a train was coming. 

The suspect didn't stop, though. Dashcam video shows them continuing at a high rate of speed and jumping the tracks while the crossing arms were fully extended. The vehicle damaged the crossing arms and nearly missed getting hit by the train. 

More officers joined the chase and followed the suspect speeding away into the city of Pacific. 

Officers found the vehicle in an apartment complex parking lot. They then learned that two suspects ran from the vehicle, and one of the suspects was found hiding in a tree.

After almost two hours of being in the tree, the suspect finally climbed down and was taken into custody without incident, according to Auburn Police.

The suspect later told detectives that the initial motive for the robbery was to sell the stolen goods for money to be used to buy drugs. 

No one was injured in the incident.