The Allen area was previously home to the Caddo, Comanche, and other indigenous peoples. The first immigrants from the United States and Europe arrived in the early 1840s. The town was established by the Houston and Central Texas Railroad and named in 1872 for Ebenezer Allen, a state politician and railroad promoter. The railroad allowed sale of crops across the country before they rotted, causing a shift from the previous cattle-based agriculture. On February 22, 1878, a gang led by Sam Bass committed in Allen what is said to be Texas's first train robbery.