The Pinkerton detectives protected trains from robbers, and strong men were also hired by the railroads to evict penniless people from taking the train without a ticket. From those early times, security on board of trains got more sophisticated until the end of the 20th century.