The Los Angeles County Sheriff's Department says they found a man who was on the lam after leading authorities on an hours-long chase in an RV hiding in a railcar. Stephen Houk was in a railroad yard in Barstow.

"He was booked for kidnapping with a firearm, assault with a deadly weapon, criminal threats and dometic violence," said Los Angeles County Sheriff Jim McDonnell.

On Tuesday, Houk led law enforcement through two counties on a pursuit. He had his two children, a 3-year-old boy and an 11-month-old girl, with him.

It all started with an argument with his girlfriend. He allegedly pointed a gun at her and threatened to harm the young girl. Detectives said after the pursuit ended, Houk drove for three hours to Bakersfield.

"He found some shelter at the library. He shaved his beard and got some rest and went to a nearby shelter where he got some food," said Capt. Eddie Hernandez.

Deputies say at that homeless shelter he found out about a train that left the area every night. He thought it was going to Arizona, but deputies found out he was on that train and arrested him when it stopped in Barstow.

Investigators said Houk is a registered sex offender in Oregon and violated his parole back in 2016. He lived in the RV with his family for two years. Officials say Houk worked odd jobs as a handyman and forced the mother of the children to panhandle.

Officials say the children are doing fine and are with their mother. The California Department of Children and Family Services is taking care of them at this time.